capo-codebuild 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 (419) hide show
  1. capo_codebuild/__init__.py +70 -0
  2. capo_codebuild/_async.py +25 -0
  3. capo_codebuild/_auth/_identity.py +16 -0
  4. capo_codebuild/_auth/_providers.py +886 -0
  5. capo_codebuild/_auth/_signers.py +88 -0
  6. capo_codebuild/_auth/_sigv4.py +434 -0
  7. capo_codebuild/_auth/_zapros_handler.py +80 -0
  8. capo_codebuild/_iter.py +113 -0
  9. capo_codebuild/_operations/code_build_20161006/batch_delete_builds.py +150 -0
  10. capo_codebuild/_operations/code_build_20161006/batch_get_build_batches.py +148 -0
  11. capo_codebuild/_operations/code_build_20161006/batch_get_builds.py +148 -0
  12. capo_codebuild/_operations/code_build_20161006/batch_get_command_executions.py +148 -0
  13. capo_codebuild/_operations/code_build_20161006/batch_get_fleets.py +148 -0
  14. capo_codebuild/_operations/code_build_20161006/batch_get_projects.py +150 -0
  15. capo_codebuild/_operations/code_build_20161006/batch_get_report_groups.py +148 -0
  16. capo_codebuild/_operations/code_build_20161006/batch_get_reports.py +148 -0
  17. capo_codebuild/_operations/code_build_20161006/batch_get_sandboxes.py +150 -0
  18. capo_codebuild/_operations/code_build_20161006/create_fleet.py +161 -0
  19. capo_codebuild/_operations/code_build_20161006/create_project.py +169 -0
  20. capo_codebuild/_operations/code_build_20161006/create_report_group.py +162 -0
  21. capo_codebuild/_operations/code_build_20161006/create_webhook.py +166 -0
  22. capo_codebuild/_operations/code_build_20161006/delete_build_batch.py +150 -0
  23. capo_codebuild/_operations/code_build_20161006/delete_fleet.py +134 -0
  24. capo_codebuild/_operations/code_build_20161006/delete_project.py +138 -0
  25. capo_codebuild/_operations/code_build_20161006/delete_report.py +138 -0
  26. capo_codebuild/_operations/code_build_20161006/delete_report_group.py +140 -0
  27. capo_codebuild/_operations/code_build_20161006/delete_resource_policy.py +142 -0
  28. capo_codebuild/_operations/code_build_20161006/delete_source_credentials.py +155 -0
  29. capo_codebuild/_operations/code_build_20161006/delete_webhook.py +148 -0
  30. capo_codebuild/_operations/code_build_20161006/describe_code_coverages.py +149 -0
  31. capo_codebuild/_operations/code_build_20161006/describe_test_cases.py +155 -0
  32. capo_codebuild/_operations/code_build_20161006/get_report_group_trend.py +154 -0
  33. capo_codebuild/_operations/code_build_20161006/get_resource_policy.py +153 -0
  34. capo_codebuild/_operations/code_build_20161006/import_source_credentials.py +162 -0
  35. capo_codebuild/_operations/code_build_20161006/invalidate_project_cache.py +147 -0
  36. capo_codebuild/_operations/code_build_20161006/list_build_batches.py +151 -0
  37. capo_codebuild/_operations/code_build_20161006/list_build_batches_for_project.py +154 -0
  38. capo_codebuild/_operations/code_build_20161006/list_builds.py +144 -0
  39. capo_codebuild/_operations/code_build_20161006/list_builds_for_project.py +153 -0
  40. capo_codebuild/_operations/code_build_20161006/list_command_executions_for_sandbox.py +153 -0
  41. capo_codebuild/_operations/code_build_20161006/list_curated_environment_images.py +142 -0
  42. capo_codebuild/_operations/code_build_20161006/list_fleets.py +145 -0
  43. capo_codebuild/_operations/code_build_20161006/list_projects.py +149 -0
  44. capo_codebuild/_operations/code_build_20161006/list_report_groups.py +151 -0
  45. capo_codebuild/_operations/code_build_20161006/list_reports.py +145 -0
  46. capo_codebuild/_operations/code_build_20161006/list_reports_for_report_group.py +154 -0
  47. capo_codebuild/_operations/code_build_20161006/list_sandboxes.py +148 -0
  48. capo_codebuild/_operations/code_build_20161006/list_sandboxes_for_project.py +157 -0
  49. capo_codebuild/_operations/code_build_20161006/list_shared_projects.py +151 -0
  50. capo_codebuild/_operations/code_build_20161006/list_shared_report_groups.py +149 -0
  51. capo_codebuild/_operations/code_build_20161006/list_source_credentials.py +147 -0
  52. capo_codebuild/_operations/code_build_20161006/put_resource_policy.py +153 -0
  53. capo_codebuild/_operations/code_build_20161006/retry_build.py +153 -0
  54. capo_codebuild/_operations/code_build_20161006/retry_build_batch.py +153 -0
  55. capo_codebuild/_operations/code_build_20161006/start_build.py +169 -0
  56. capo_codebuild/_operations/code_build_20161006/start_build_batch.py +167 -0
  57. capo_codebuild/_operations/code_build_20161006/start_command_execution.py +153 -0
  58. capo_codebuild/_operations/code_build_20161006/start_sandbox.py +157 -0
  59. capo_codebuild/_operations/code_build_20161006/start_sandbox_connection.py +152 -0
  60. capo_codebuild/_operations/code_build_20161006/stop_build.py +148 -0
  61. capo_codebuild/_operations/code_build_20161006/stop_build_batch.py +152 -0
  62. capo_codebuild/_operations/code_build_20161006/stop_sandbox.py +148 -0
  63. capo_codebuild/_operations/code_build_20161006/update_fleet.py +161 -0
  64. capo_codebuild/_operations/code_build_20161006/update_project.py +164 -0
  65. capo_codebuild/_operations/code_build_20161006/update_project_visibility.py +156 -0
  66. capo_codebuild/_operations/code_build_20161006/update_report_group.py +156 -0
  67. capo_codebuild/_operations/code_build_20161006/update_webhook.py +160 -0
  68. capo_codebuild/_pagination.py +21 -0
  69. capo_codebuild/_protocol/__init__.py +1 -0
  70. capo_codebuild/_protocol/errors.py +93 -0
  71. capo_codebuild/_protocol/eventstream.py +238 -0
  72. capo_codebuild/_protocol/serialize.py +47 -0
  73. capo_codebuild/_protocol/xml.py +33 -0
  74. capo_codebuild/_rule_engine/__init__.py +0 -0
  75. capo_codebuild/_rule_engine/_aws_partition.py +160 -0
  76. capo_codebuild/_rule_engine/_endpoint_rule_set.py +136 -0
  77. capo_codebuild/_rule_engine/_endpoint_runtime.py +389 -0
  78. capo_codebuild/_services/_aws_config.py +160 -0
  79. capo_codebuild/_services/_pipeline.py +198 -0
  80. capo_codebuild/_services/async_code_build.py +4509 -0
  81. capo_codebuild/_services/code_build.py +4450 -0
  82. capo_codebuild/errors/__init__.py +37 -0
  83. capo_codebuild/errors/_base.py +94 -0
  84. capo_codebuild/errors/account_limit_exceeded_exception.py +53 -0
  85. capo_codebuild/errors/account_suspended_exception.py +51 -0
  86. capo_codebuild/errors/invalid_input_exception.py +51 -0
  87. capo_codebuild/errors/o_auth_provider_exception.py +51 -0
  88. capo_codebuild/errors/resource_already_exists_exception.py +53 -0
  89. capo_codebuild/errors/resource_not_found_exception.py +51 -0
  90. capo_codebuild/py.typed +0 -0
  91. capo_codebuild/types/_prelude/blob.py +12 -0
  92. capo_codebuild/types/_prelude/timestamp.py +17 -0
  93. capo_codebuild/types/artifact_namespace.py +17 -0
  94. capo_codebuild/types/artifact_packaging.py +17 -0
  95. capo_codebuild/types/artifacts_type.py +18 -0
  96. capo_codebuild/types/auth_type.py +20 -0
  97. capo_codebuild/types/auto_retry_config.py +47 -0
  98. capo_codebuild/types/batch_delete_builds_input.py +37 -0
  99. capo_codebuild/types/batch_delete_builds_output.py +57 -0
  100. capo_codebuild/types/batch_get_build_batches_input.py +39 -0
  101. capo_codebuild/types/batch_get_build_batches_output.py +59 -0
  102. capo_codebuild/types/batch_get_builds_input.py +37 -0
  103. capo_codebuild/types/batch_get_builds_output.py +53 -0
  104. capo_codebuild/types/batch_get_command_executions_input.py +55 -0
  105. capo_codebuild/types/batch_get_command_executions_output.py +63 -0
  106. capo_codebuild/types/batch_get_fleets_input.py +39 -0
  107. capo_codebuild/types/batch_get_fleets_output.py +53 -0
  108. capo_codebuild/types/batch_get_projects_input.py +39 -0
  109. capo_codebuild/types/batch_get_projects_output.py +55 -0
  110. capo_codebuild/types/batch_get_report_groups_input.py +45 -0
  111. capo_codebuild/types/batch_get_report_groups_output.py +59 -0
  112. capo_codebuild/types/batch_get_reports_input.py +39 -0
  113. capo_codebuild/types/batch_get_reports_output.py +55 -0
  114. capo_codebuild/types/batch_get_sandboxes_input.py +37 -0
  115. capo_codebuild/types/batch_get_sandboxes_output.py +55 -0
  116. capo_codebuild/types/batch_report_mode_type.py +17 -0
  117. capo_codebuild/types/batch_restrictions.py +68 -0
  118. capo_codebuild/types/boolean.py +5 -0
  119. capo_codebuild/types/bucket_owner_access.py +19 -0
  120. capo_codebuild/types/build.py +455 -0
  121. capo_codebuild/types/build_artifacts.py +83 -0
  122. capo_codebuild/types/build_artifacts_list.py +31 -0
  123. capo_codebuild/types/build_batch.py +416 -0
  124. capo_codebuild/types/build_batch_filter.py +36 -0
  125. capo_codebuild/types/build_batch_ids.py +17 -0
  126. capo_codebuild/types/build_batch_phase.py +108 -0
  127. capo_codebuild/types/build_batch_phase_type.py +22 -0
  128. capo_codebuild/types/build_batch_phases.py +33 -0
  129. capo_codebuild/types/build_batches.py +29 -0
  130. capo_codebuild/types/build_group.py +93 -0
  131. capo_codebuild/types/build_groups.py +29 -0
  132. capo_codebuild/types/build_ids.py +17 -0
  133. capo_codebuild/types/build_not_deleted.py +35 -0
  134. capo_codebuild/types/build_phase.py +104 -0
  135. capo_codebuild/types/build_phase_type.py +26 -0
  136. capo_codebuild/types/build_phases.py +29 -0
  137. capo_codebuild/types/build_report_arns.py +17 -0
  138. capo_codebuild/types/build_status_config.py +34 -0
  139. capo_codebuild/types/build_summaries.py +29 -0
  140. capo_codebuild/types/build_summary.py +100 -0
  141. capo_codebuild/types/build_time_out.py +5 -0
  142. capo_codebuild/types/builds.py +29 -0
  143. capo_codebuild/types/builds_not_deleted.py +33 -0
  144. capo_codebuild/types/cache_mode.py +18 -0
  145. capo_codebuild/types/cache_type.py +18 -0
  146. capo_codebuild/types/cloud_watch_logs_config.py +54 -0
  147. capo_codebuild/types/code_coverage.py +114 -0
  148. capo_codebuild/types/code_coverage_report_summary.py +80 -0
  149. capo_codebuild/types/code_coverages.py +29 -0
  150. capo_codebuild/types/command_execution.py +149 -0
  151. capo_codebuild/types/command_execution_ids.py +19 -0
  152. capo_codebuild/types/command_executions.py +33 -0
  153. capo_codebuild/types/command_type.py +14 -0
  154. capo_codebuild/types/compute_configuration.py +64 -0
  155. capo_codebuild/types/compute_type.py +27 -0
  156. capo_codebuild/types/compute_types_allowed.py +19 -0
  157. capo_codebuild/types/create_fleet_input.py +205 -0
  158. capo_codebuild/types/create_fleet_output.py +34 -0
  159. capo_codebuild/types/create_project_input.py +314 -0
  160. capo_codebuild/types/create_project_output.py +36 -0
  161. capo_codebuild/types/create_report_group_input.py +80 -0
  162. capo_codebuild/types/create_report_group_output.py +38 -0
  163. capo_codebuild/types/create_webhook_input.py +123 -0
  164. capo_codebuild/types/create_webhook_output.py +36 -0
  165. capo_codebuild/types/credential_provider_type.py +14 -0
  166. capo_codebuild/types/debug_session.py +35 -0
  167. capo_codebuild/types/delete_build_batch_input.py +31 -0
  168. capo_codebuild/types/delete_build_batch_output.py +64 -0
  169. capo_codebuild/types/delete_fleet_input.py +31 -0
  170. capo_codebuild/types/delete_fleet_output.py +18 -0
  171. capo_codebuild/types/delete_project_input.py +31 -0
  172. capo_codebuild/types/delete_project_output.py +18 -0
  173. capo_codebuild/types/delete_report_group_input.py +39 -0
  174. capo_codebuild/types/delete_report_group_output.py +18 -0
  175. capo_codebuild/types/delete_report_input.py +31 -0
  176. capo_codebuild/types/delete_report_output.py +18 -0
  177. capo_codebuild/types/delete_resource_policy_input.py +31 -0
  178. capo_codebuild/types/delete_resource_policy_output.py +18 -0
  179. capo_codebuild/types/delete_source_credentials_input.py +31 -0
  180. capo_codebuild/types/delete_source_credentials_output.py +28 -0
  181. capo_codebuild/types/delete_webhook_input.py +31 -0
  182. capo_codebuild/types/delete_webhook_output.py +18 -0
  183. capo_codebuild/types/describe_code_coverages_input.py +118 -0
  184. capo_codebuild/types/describe_code_coverages_output.py +47 -0
  185. capo_codebuild/types/describe_test_cases_input.py +59 -0
  186. capo_codebuild/types/describe_test_cases_output.py +43 -0
  187. capo_codebuild/types/docker_server.py +81 -0
  188. capo_codebuild/types/docker_server_status.py +34 -0
  189. capo_codebuild/types/environment_image.py +49 -0
  190. capo_codebuild/types/environment_images.py +33 -0
  191. capo_codebuild/types/environment_language.py +53 -0
  192. capo_codebuild/types/environment_languages.py +35 -0
  193. capo_codebuild/types/environment_platform.py +57 -0
  194. capo_codebuild/types/environment_platforms.py +35 -0
  195. capo_codebuild/types/environment_type.py +27 -0
  196. capo_codebuild/types/environment_variable.py +60 -0
  197. capo_codebuild/types/environment_variable_type.py +18 -0
  198. capo_codebuild/types/environment_variables.py +35 -0
  199. capo_codebuild/types/exported_environment_variable.py +35 -0
  200. capo_codebuild/types/exported_environment_variables.py +39 -0
  201. capo_codebuild/types/file_system_type.py +14 -0
  202. capo_codebuild/types/filter_group.py +29 -0
  203. capo_codebuild/types/filter_groups.py +29 -0
  204. capo_codebuild/types/fleet.py +257 -0
  205. capo_codebuild/types/fleet_arns.py +17 -0
  206. capo_codebuild/types/fleet_capacity.py +5 -0
  207. capo_codebuild/types/fleet_context_code.py +20 -0
  208. capo_codebuild/types/fleet_name.py +5 -0
  209. capo_codebuild/types/fleet_names.py +17 -0
  210. capo_codebuild/types/fleet_overflow_behavior.py +17 -0
  211. capo_codebuild/types/fleet_proxy_rule.py +81 -0
  212. capo_codebuild/types/fleet_proxy_rule_behavior.py +17 -0
  213. capo_codebuild/types/fleet_proxy_rule_effect_type.py +17 -0
  214. capo_codebuild/types/fleet_proxy_rule_entities.py +17 -0
  215. capo_codebuild/types/fleet_proxy_rule_type.py +17 -0
  216. capo_codebuild/types/fleet_proxy_rules.py +31 -0
  217. capo_codebuild/types/fleet_scaling_metric_type.py +14 -0
  218. capo_codebuild/types/fleet_scaling_type.py +14 -0
  219. capo_codebuild/types/fleet_sort_by_type.py +18 -0
  220. capo_codebuild/types/fleet_status.py +64 -0
  221. capo_codebuild/types/fleet_status_code.py +23 -0
  222. capo_codebuild/types/fleets.py +29 -0
  223. capo_codebuild/types/fleets_allowed.py +17 -0
  224. capo_codebuild/types/get_report_group_trend_input.py +60 -0
  225. capo_codebuild/types/get_report_group_trend_output.py +63 -0
  226. capo_codebuild/types/get_resource_policy_input.py +31 -0
  227. capo_codebuild/types/get_resource_policy_output.py +28 -0
  228. capo_codebuild/types/git_clone_depth.py +5 -0
  229. capo_codebuild/types/git_submodules_config.py +31 -0
  230. capo_codebuild/types/identifiers.py +17 -0
  231. capo_codebuild/types/image_pull_credentials_type.py +17 -0
  232. capo_codebuild/types/image_versions.py +17 -0
  233. capo_codebuild/types/import_source_credentials_input.py +77 -0
  234. capo_codebuild/types/import_source_credentials_output.py +28 -0
  235. capo_codebuild/types/invalidate_project_cache_input.py +31 -0
  236. capo_codebuild/types/invalidate_project_cache_output.py +18 -0
  237. capo_codebuild/types/key_input.py +5 -0
  238. capo_codebuild/types/language_type.py +25 -0
  239. capo_codebuild/types/list_build_batches_for_project_input.py +76 -0
  240. capo_codebuild/types/list_build_batches_for_project_output.py +43 -0
  241. capo_codebuild/types/list_build_batches_input.py +69 -0
  242. capo_codebuild/types/list_build_batches_output.py +43 -0
  243. capo_codebuild/types/list_builds_for_project_input.py +55 -0
  244. capo_codebuild/types/list_builds_for_project_output.py +41 -0
  245. capo_codebuild/types/list_builds_input.py +45 -0
  246. capo_codebuild/types/list_builds_output.py +41 -0
  247. capo_codebuild/types/list_command_executions_for_sandbox_input.py +64 -0
  248. capo_codebuild/types/list_command_executions_for_sandbox_output.py +49 -0
  249. capo_codebuild/types/list_curated_environment_images_input.py +18 -0
  250. capo_codebuild/types/list_curated_environment_images_output.py +42 -0
  251. capo_codebuild/types/list_fleets_input.py +69 -0
  252. capo_codebuild/types/list_fleets_output.py +43 -0
  253. capo_codebuild/types/list_projects_input.py +64 -0
  254. capo_codebuild/types/list_projects_output.py +43 -0
  255. capo_codebuild/types/list_report_groups_input.py +73 -0
  256. capo_codebuild/types/list_report_groups_output.py +47 -0
  257. capo_codebuild/types/list_reports_for_report_group_input.py +78 -0
  258. capo_codebuild/types/list_reports_for_report_group_output.py +43 -0
  259. capo_codebuild/types/list_reports_input.py +67 -0
  260. capo_codebuild/types/list_reports_output.py +43 -0
  261. capo_codebuild/types/list_sandboxes_for_project_input.py +62 -0
  262. capo_codebuild/types/list_sandboxes_for_project_output.py +43 -0
  263. capo_codebuild/types/list_sandboxes_input.py +52 -0
  264. capo_codebuild/types/list_sandboxes_output.py +43 -0
  265. capo_codebuild/types/list_shared_projects_input.py +73 -0
  266. capo_codebuild/types/list_shared_projects_output.py +43 -0
  267. capo_codebuild/types/list_shared_report_groups_input.py +73 -0
  268. capo_codebuild/types/list_shared_report_groups_output.py +47 -0
  269. capo_codebuild/types/list_source_credentials_input.py +18 -0
  270. capo_codebuild/types/list_source_credentials_output.py +42 -0
  271. capo_codebuild/types/logs_config.py +57 -0
  272. capo_codebuild/types/logs_config_status_type.py +17 -0
  273. capo_codebuild/types/logs_location.py +94 -0
  274. capo_codebuild/types/machine_type.py +17 -0
  275. capo_codebuild/types/network_interface.py +36 -0
  276. capo_codebuild/types/non_empty_string.py +5 -0
  277. capo_codebuild/types/non_negative_int.py +5 -0
  278. capo_codebuild/types/page_size.py +5 -0
  279. capo_codebuild/types/percentage.py +5 -0
  280. capo_codebuild/types/phase_context.py +34 -0
  281. capo_codebuild/types/phase_contexts.py +29 -0
  282. capo_codebuild/types/platform_type.py +19 -0
  283. capo_codebuild/types/project.py +405 -0
  284. capo_codebuild/types/project_arns.py +17 -0
  285. capo_codebuild/types/project_artifacts.py +141 -0
  286. capo_codebuild/types/project_artifacts_list.py +33 -0
  287. capo_codebuild/types/project_badge.py +36 -0
  288. capo_codebuild/types/project_build_batch_config.py +86 -0
  289. capo_codebuild/types/project_cache.py +67 -0
  290. capo_codebuild/types/project_cache_modes.py +29 -0
  291. capo_codebuild/types/project_description.py +5 -0
  292. capo_codebuild/types/project_environment.py +195 -0
  293. capo_codebuild/types/project_file_system_location.py +61 -0
  294. capo_codebuild/types/project_file_system_locations.py +39 -0
  295. capo_codebuild/types/project_fleet.py +28 -0
  296. capo_codebuild/types/project_name.py +5 -0
  297. capo_codebuild/types/project_names.py +17 -0
  298. capo_codebuild/types/project_secondary_source_versions.py +35 -0
  299. capo_codebuild/types/project_sort_by_type.py +18 -0
  300. capo_codebuild/types/project_source.py +135 -0
  301. capo_codebuild/types/project_source_version.py +38 -0
  302. capo_codebuild/types/project_sources.py +29 -0
  303. capo_codebuild/types/project_visibility_type.py +18 -0
  304. capo_codebuild/types/projects.py +29 -0
  305. capo_codebuild/types/proxy_configuration.py +63 -0
  306. capo_codebuild/types/pull_request_build_approver_role.py +29 -0
  307. capo_codebuild/types/pull_request_build_approver_roles.py +39 -0
  308. capo_codebuild/types/pull_request_build_comment_approval.py +18 -0
  309. capo_codebuild/types/pull_request_build_policy.py +66 -0
  310. capo_codebuild/types/put_resource_policy_input.py +38 -0
  311. capo_codebuild/types/put_resource_policy_output.py +28 -0
  312. capo_codebuild/types/registry_credential.py +53 -0
  313. capo_codebuild/types/report.py +180 -0
  314. capo_codebuild/types/report_arns.py +17 -0
  315. capo_codebuild/types/report_code_coverage_sort_by_type.py +17 -0
  316. capo_codebuild/types/report_export_config.py +63 -0
  317. capo_codebuild/types/report_export_config_type.py +17 -0
  318. capo_codebuild/types/report_filter.py +38 -0
  319. capo_codebuild/types/report_group.py +136 -0
  320. capo_codebuild/types/report_group_arns.py +19 -0
  321. capo_codebuild/types/report_group_name.py +5 -0
  322. capo_codebuild/types/report_group_sort_by_type.py +18 -0
  323. capo_codebuild/types/report_group_status_type.py +17 -0
  324. capo_codebuild/types/report_group_trend_field_type.py +24 -0
  325. capo_codebuild/types/report_group_trend_raw_data_list.py +35 -0
  326. capo_codebuild/types/report_group_trend_stats.py +40 -0
  327. capo_codebuild/types/report_groups.py +29 -0
  328. capo_codebuild/types/report_packaging_type.py +17 -0
  329. capo_codebuild/types/report_status_counts.py +28 -0
  330. capo_codebuild/types/report_status_type.py +20 -0
  331. capo_codebuild/types/report_type.py +17 -0
  332. capo_codebuild/types/report_with_raw_data.py +35 -0
  333. capo_codebuild/types/reports.py +29 -0
  334. capo_codebuild/types/resolved_artifact.py +49 -0
  335. capo_codebuild/types/resolved_secondary_artifacts.py +33 -0
  336. capo_codebuild/types/retry_build_batch_input.py +56 -0
  337. capo_codebuild/types/retry_build_batch_output.py +35 -0
  338. capo_codebuild/types/retry_build_batch_type.py +17 -0
  339. capo_codebuild/types/retry_build_input.py +35 -0
  340. capo_codebuild/types/retry_build_output.py +33 -0
  341. capo_codebuild/types/s3_logs_config.py +77 -0
  342. capo_codebuild/types/s3_report_export_config.py +77 -0
  343. capo_codebuild/types/sandbox.py +267 -0
  344. capo_codebuild/types/sandbox_ids.py +17 -0
  345. capo_codebuild/types/sandbox_session.py +133 -0
  346. capo_codebuild/types/sandbox_session_phase.py +94 -0
  347. capo_codebuild/types/sandbox_session_phases.py +35 -0
  348. capo_codebuild/types/sandboxes.py +29 -0
  349. capo_codebuild/types/scaling_configuration_input.py +70 -0
  350. capo_codebuild/types/scaling_configuration_output.py +76 -0
  351. capo_codebuild/types/scope_configuration.py +53 -0
  352. capo_codebuild/types/security_group_ids.py +19 -0
  353. capo_codebuild/types/sensitive_non_empty_string.py +5 -0
  354. capo_codebuild/types/sensitive_string.py +5 -0
  355. capo_codebuild/types/server_type.py +20 -0
  356. capo_codebuild/types/shared_resource_sort_by_type.py +17 -0
  357. capo_codebuild/types/sort_order_type.py +17 -0
  358. capo_codebuild/types/source_auth.py +46 -0
  359. capo_codebuild/types/source_auth_type.py +18 -0
  360. capo_codebuild/types/source_credentials_info.py +65 -0
  361. capo_codebuild/types/source_credentials_infos.py +35 -0
  362. capo_codebuild/types/source_type.py +24 -0
  363. capo_codebuild/types/ssm_session.py +40 -0
  364. capo_codebuild/types/start_build_batch_input.py +459 -0
  365. capo_codebuild/types/start_build_batch_output.py +36 -0
  366. capo_codebuild/types/start_build_input.py +481 -0
  367. capo_codebuild/types/start_build_output.py +34 -0
  368. capo_codebuild/types/start_command_execution_input.py +54 -0
  369. capo_codebuild/types/start_command_execution_output.py +42 -0
  370. capo_codebuild/types/start_sandbox_connection_input.py +31 -0
  371. capo_codebuild/types/start_sandbox_connection_output.py +36 -0
  372. capo_codebuild/types/start_sandbox_input.py +37 -0
  373. capo_codebuild/types/start_sandbox_output.py +36 -0
  374. capo_codebuild/types/status_type.py +21 -0
  375. capo_codebuild/types/stop_build_batch_input.py +31 -0
  376. capo_codebuild/types/stop_build_batch_output.py +35 -0
  377. capo_codebuild/types/stop_build_input.py +31 -0
  378. capo_codebuild/types/stop_build_output.py +34 -0
  379. capo_codebuild/types/stop_sandbox_input.py +31 -0
  380. capo_codebuild/types/stop_sandbox_output.py +36 -0
  381. capo_codebuild/types/string.py +5 -0
  382. capo_codebuild/types/subnets.py +17 -0
  383. capo_codebuild/types/tag.py +35 -0
  384. capo_codebuild/types/tag_list.py +29 -0
  385. capo_codebuild/types/target_tracking_scaling_configuration.py +57 -0
  386. capo_codebuild/types/target_tracking_scaling_configurations.py +39 -0
  387. capo_codebuild/types/test_case.py +89 -0
  388. capo_codebuild/types/test_case_filter.py +34 -0
  389. capo_codebuild/types/test_cases.py +29 -0
  390. capo_codebuild/types/test_report_summary.py +61 -0
  391. capo_codebuild/types/time_out.py +5 -0
  392. capo_codebuild/types/timestamp.py +20 -0
  393. capo_codebuild/types/update_fleet_input.py +203 -0
  394. capo_codebuild/types/update_fleet_output.py +34 -0
  395. capo_codebuild/types/update_project_input.py +312 -0
  396. capo_codebuild/types/update_project_output.py +36 -0
  397. capo_codebuild/types/update_project_visibility_input.py +62 -0
  398. capo_codebuild/types/update_project_visibility_output.py +56 -0
  399. capo_codebuild/types/update_report_group_input.py +67 -0
  400. capo_codebuild/types/update_report_group_output.py +38 -0
  401. capo_codebuild/types/update_webhook_input.py +103 -0
  402. capo_codebuild/types/update_webhook_output.py +36 -0
  403. capo_codebuild/types/value_input.py +5 -0
  404. capo_codebuild/types/vpc_config.py +64 -0
  405. capo_codebuild/types/webhook.py +171 -0
  406. capo_codebuild/types/webhook_build_type.py +18 -0
  407. capo_codebuild/types/webhook_filter.py +56 -0
  408. capo_codebuild/types/webhook_filter_type.py +26 -0
  409. capo_codebuild/types/webhook_scope_type.py +18 -0
  410. capo_codebuild/types/webhook_status.py +19 -0
  411. capo_codebuild/types/wrapper_boolean.py +5 -0
  412. capo_codebuild/types/wrapper_double.py +5 -0
  413. capo_codebuild/types/wrapper_int.py +5 -0
  414. capo_codebuild/types/wrapper_long.py +5 -0
  415. capo_codebuild-0.1.0.dist-info/METADATA +101 -0
  416. capo_codebuild-0.1.0.dist-info/RECORD +419 -0
  417. capo_codebuild-0.1.0.dist-info/WHEEL +5 -0
  418. capo_codebuild-0.1.0.dist-info/licenses/LICENSE +21 -0
  419. capo_codebuild-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,4450 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codebuild#CodeBuild_20161006``."""
2
+
3
+ import warnings
4
+ from collections.abc import Iterator
5
+ from typing import TYPE_CHECKING, Any, Iterable, Optional
6
+
7
+ from typing_extensions import Self, TypedDict
8
+ from zapros import BaseHandler, Client
9
+
10
+ import capo_codebuild._auth._signers
11
+ import capo_codebuild._auth._sigv4
12
+ from capo_codebuild._auth._identity import Credentials
13
+ from capo_codebuild._auth._providers import (
14
+ CredentialsProvider,
15
+ IdentityProvider,
16
+ StaticAwsCredentialsProvider,
17
+ default_aws_credentials_chain,
18
+ )
19
+ from capo_codebuild._auth._zapros_handler import AuthMiddleware
20
+ from capo_codebuild._pagination import resolve_path as _resolve_path
21
+ from capo_codebuild._services._aws_config import aws_config
22
+ from capo_codebuild._services._pipeline import (
23
+ Interceptor,
24
+ OperationOptions,
25
+ OperationRequest,
26
+ OperationResponse,
27
+ execute_pipeline,
28
+ retry,
29
+ )
30
+
31
+ if TYPE_CHECKING:
32
+ import capo_codebuild.types.auth_type
33
+ import capo_codebuild.types.batch_delete_builds_input
34
+ import capo_codebuild.types.batch_delete_builds_output
35
+ import capo_codebuild.types.batch_get_build_batches_input
36
+ import capo_codebuild.types.batch_get_build_batches_output
37
+ import capo_codebuild.types.batch_get_builds_input
38
+ import capo_codebuild.types.batch_get_builds_output
39
+ import capo_codebuild.types.batch_get_command_executions_input
40
+ import capo_codebuild.types.batch_get_command_executions_output
41
+ import capo_codebuild.types.batch_get_fleets_input
42
+ import capo_codebuild.types.batch_get_fleets_output
43
+ import capo_codebuild.types.batch_get_projects_input
44
+ import capo_codebuild.types.batch_get_projects_output
45
+ import capo_codebuild.types.batch_get_report_groups_input
46
+ import capo_codebuild.types.batch_get_report_groups_output
47
+ import capo_codebuild.types.batch_get_reports_input
48
+ import capo_codebuild.types.batch_get_reports_output
49
+ import capo_codebuild.types.batch_get_sandboxes_input
50
+ import capo_codebuild.types.batch_get_sandboxes_output
51
+ import capo_codebuild.types.boolean
52
+ import capo_codebuild.types.build_batch_filter
53
+ import capo_codebuild.types.build_batch_ids
54
+ import capo_codebuild.types.build_ids
55
+ import capo_codebuild.types.build_status_config
56
+ import capo_codebuild.types.build_time_out
57
+ import capo_codebuild.types.code_coverage
58
+ import capo_codebuild.types.command_execution
59
+ import capo_codebuild.types.command_execution_ids
60
+ import capo_codebuild.types.command_type
61
+ import capo_codebuild.types.compute_configuration
62
+ import capo_codebuild.types.compute_type
63
+ import capo_codebuild.types.create_fleet_input
64
+ import capo_codebuild.types.create_fleet_output
65
+ import capo_codebuild.types.create_project_input
66
+ import capo_codebuild.types.create_project_output
67
+ import capo_codebuild.types.create_report_group_input
68
+ import capo_codebuild.types.create_report_group_output
69
+ import capo_codebuild.types.create_webhook_input
70
+ import capo_codebuild.types.create_webhook_output
71
+ import capo_codebuild.types.delete_build_batch_input
72
+ import capo_codebuild.types.delete_build_batch_output
73
+ import capo_codebuild.types.delete_fleet_input
74
+ import capo_codebuild.types.delete_fleet_output
75
+ import capo_codebuild.types.delete_project_input
76
+ import capo_codebuild.types.delete_project_output
77
+ import capo_codebuild.types.delete_report_group_input
78
+ import capo_codebuild.types.delete_report_group_output
79
+ import capo_codebuild.types.delete_report_input
80
+ import capo_codebuild.types.delete_report_output
81
+ import capo_codebuild.types.delete_resource_policy_input
82
+ import capo_codebuild.types.delete_resource_policy_output
83
+ import capo_codebuild.types.delete_source_credentials_input
84
+ import capo_codebuild.types.delete_source_credentials_output
85
+ import capo_codebuild.types.delete_webhook_input
86
+ import capo_codebuild.types.delete_webhook_output
87
+ import capo_codebuild.types.describe_code_coverages_input
88
+ import capo_codebuild.types.describe_code_coverages_output
89
+ import capo_codebuild.types.describe_test_cases_input
90
+ import capo_codebuild.types.describe_test_cases_output
91
+ import capo_codebuild.types.environment_type
92
+ import capo_codebuild.types.environment_variables
93
+ import capo_codebuild.types.filter_groups
94
+ import capo_codebuild.types.fleet_capacity
95
+ import capo_codebuild.types.fleet_name
96
+ import capo_codebuild.types.fleet_names
97
+ import capo_codebuild.types.fleet_overflow_behavior
98
+ import capo_codebuild.types.fleet_sort_by_type
99
+ import capo_codebuild.types.get_report_group_trend_input
100
+ import capo_codebuild.types.get_report_group_trend_output
101
+ import capo_codebuild.types.get_resource_policy_input
102
+ import capo_codebuild.types.get_resource_policy_output
103
+ import capo_codebuild.types.git_clone_depth
104
+ import capo_codebuild.types.git_submodules_config
105
+ import capo_codebuild.types.image_pull_credentials_type
106
+ import capo_codebuild.types.import_source_credentials_input
107
+ import capo_codebuild.types.import_source_credentials_output
108
+ import capo_codebuild.types.invalidate_project_cache_input
109
+ import capo_codebuild.types.invalidate_project_cache_output
110
+ import capo_codebuild.types.list_build_batches_for_project_input
111
+ import capo_codebuild.types.list_build_batches_for_project_output
112
+ import capo_codebuild.types.list_build_batches_input
113
+ import capo_codebuild.types.list_build_batches_output
114
+ import capo_codebuild.types.list_builds_for_project_input
115
+ import capo_codebuild.types.list_builds_for_project_output
116
+ import capo_codebuild.types.list_builds_input
117
+ import capo_codebuild.types.list_builds_output
118
+ import capo_codebuild.types.list_command_executions_for_sandbox_input
119
+ import capo_codebuild.types.list_command_executions_for_sandbox_output
120
+ import capo_codebuild.types.list_curated_environment_images_input
121
+ import capo_codebuild.types.list_curated_environment_images_output
122
+ import capo_codebuild.types.list_fleets_input
123
+ import capo_codebuild.types.list_fleets_output
124
+ import capo_codebuild.types.list_projects_input
125
+ import capo_codebuild.types.list_projects_output
126
+ import capo_codebuild.types.list_report_groups_input
127
+ import capo_codebuild.types.list_report_groups_output
128
+ import capo_codebuild.types.list_reports_for_report_group_input
129
+ import capo_codebuild.types.list_reports_for_report_group_output
130
+ import capo_codebuild.types.list_reports_input
131
+ import capo_codebuild.types.list_reports_output
132
+ import capo_codebuild.types.list_sandboxes_for_project_input
133
+ import capo_codebuild.types.list_sandboxes_for_project_output
134
+ import capo_codebuild.types.list_sandboxes_input
135
+ import capo_codebuild.types.list_sandboxes_output
136
+ import capo_codebuild.types.list_shared_projects_input
137
+ import capo_codebuild.types.list_shared_projects_output
138
+ import capo_codebuild.types.list_shared_report_groups_input
139
+ import capo_codebuild.types.list_shared_report_groups_output
140
+ import capo_codebuild.types.list_source_credentials_input
141
+ import capo_codebuild.types.list_source_credentials_output
142
+ import capo_codebuild.types.logs_config
143
+ import capo_codebuild.types.non_empty_string
144
+ import capo_codebuild.types.page_size
145
+ import capo_codebuild.types.percentage
146
+ import capo_codebuild.types.project_artifacts
147
+ import capo_codebuild.types.project_artifacts_list
148
+ import capo_codebuild.types.project_build_batch_config
149
+ import capo_codebuild.types.project_cache
150
+ import capo_codebuild.types.project_description
151
+ import capo_codebuild.types.project_environment
152
+ import capo_codebuild.types.project_file_system_locations
153
+ import capo_codebuild.types.project_fleet
154
+ import capo_codebuild.types.project_name
155
+ import capo_codebuild.types.project_names
156
+ import capo_codebuild.types.project_secondary_source_versions
157
+ import capo_codebuild.types.project_sort_by_type
158
+ import capo_codebuild.types.project_source
159
+ import capo_codebuild.types.project_sources
160
+ import capo_codebuild.types.project_visibility_type
161
+ import capo_codebuild.types.proxy_configuration
162
+ import capo_codebuild.types.pull_request_build_policy
163
+ import capo_codebuild.types.put_resource_policy_input
164
+ import capo_codebuild.types.put_resource_policy_output
165
+ import capo_codebuild.types.registry_credential
166
+ import capo_codebuild.types.report_arns
167
+ import capo_codebuild.types.report_code_coverage_sort_by_type
168
+ import capo_codebuild.types.report_export_config
169
+ import capo_codebuild.types.report_filter
170
+ import capo_codebuild.types.report_group_arns
171
+ import capo_codebuild.types.report_group_name
172
+ import capo_codebuild.types.report_group_sort_by_type
173
+ import capo_codebuild.types.report_group_trend_field_type
174
+ import capo_codebuild.types.report_type
175
+ import capo_codebuild.types.retry_build_batch_input
176
+ import capo_codebuild.types.retry_build_batch_output
177
+ import capo_codebuild.types.retry_build_batch_type
178
+ import capo_codebuild.types.retry_build_input
179
+ import capo_codebuild.types.retry_build_output
180
+ import capo_codebuild.types.sandbox_ids
181
+ import capo_codebuild.types.scaling_configuration_input
182
+ import capo_codebuild.types.scope_configuration
183
+ import capo_codebuild.types.sensitive_non_empty_string
184
+ import capo_codebuild.types.sensitive_string
185
+ import capo_codebuild.types.server_type
186
+ import capo_codebuild.types.shared_resource_sort_by_type
187
+ import capo_codebuild.types.sort_order_type
188
+ import capo_codebuild.types.source_auth
189
+ import capo_codebuild.types.source_type
190
+ import capo_codebuild.types.start_build_batch_input
191
+ import capo_codebuild.types.start_build_batch_output
192
+ import capo_codebuild.types.start_build_input
193
+ import capo_codebuild.types.start_build_output
194
+ import capo_codebuild.types.start_command_execution_input
195
+ import capo_codebuild.types.start_command_execution_output
196
+ import capo_codebuild.types.start_sandbox_connection_input
197
+ import capo_codebuild.types.start_sandbox_connection_output
198
+ import capo_codebuild.types.start_sandbox_input
199
+ import capo_codebuild.types.start_sandbox_output
200
+ import capo_codebuild.types.stop_build_batch_input
201
+ import capo_codebuild.types.stop_build_batch_output
202
+ import capo_codebuild.types.stop_build_input
203
+ import capo_codebuild.types.stop_build_output
204
+ import capo_codebuild.types.stop_sandbox_input
205
+ import capo_codebuild.types.stop_sandbox_output
206
+ import capo_codebuild.types.string
207
+ import capo_codebuild.types.tag_list
208
+ import capo_codebuild.types.test_case
209
+ import capo_codebuild.types.test_case_filter
210
+ import capo_codebuild.types.time_out
211
+ import capo_codebuild.types.update_fleet_input
212
+ import capo_codebuild.types.update_fleet_output
213
+ import capo_codebuild.types.update_project_input
214
+ import capo_codebuild.types.update_project_output
215
+ import capo_codebuild.types.update_project_visibility_input
216
+ import capo_codebuild.types.update_project_visibility_output
217
+ import capo_codebuild.types.update_report_group_input
218
+ import capo_codebuild.types.update_report_group_output
219
+ import capo_codebuild.types.update_webhook_input
220
+ import capo_codebuild.types.update_webhook_output
221
+ import capo_codebuild.types.vpc_config
222
+ import capo_codebuild.types.webhook_build_type
223
+ import capo_codebuild.types.wrapper_boolean
224
+ import capo_codebuild.types.wrapper_int
225
+
226
+
227
+ class CodeBuildClientConfig(TypedDict, total=False, closed=True):
228
+ operation_interceptors: Iterable[Interceptor[Any, Any]]
229
+ retry_max_attempts: int | None
230
+ region: str | None
231
+ use_dual_stack: bool | None
232
+ use_fips: bool | None
233
+ endpoint: str | None
234
+ credentials_provider: IdentityProvider[Credentials] | None
235
+
236
+
237
+ class CodeBuildClient:
238
+ """A client for the ``CodeBuild`` service.
239
+
240
+ Args:
241
+ http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
242
+ operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
243
+ retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
244
+ region: The value of the ``AWS::Region`` endpoint parameter.
245
+ use_dual_stack: The value of the ``AWS::UseDualStack`` endpoint parameter.
246
+ use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
247
+ endpoint: The value of the ``SDK::Endpoint`` endpoint parameter.
248
+ credentials: AWS credentials for request signing.
249
+ credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
250
+ """
251
+
252
+ def __init__(
253
+ self,
254
+ http_handler: BaseHandler | None = None,
255
+ operation_interceptors: Iterable[Interceptor[Any, Any]] | None = None,
256
+ retry_max_attempts: int | None = None,
257
+ region: str | None = None,
258
+ use_dual_stack: bool | None = None,
259
+ use_fips: bool | None = None,
260
+ endpoint: str | None = None,
261
+ credentials: Credentials | None = None,
262
+ credentials_provider: CredentialsProvider | None = None,
263
+ ):
264
+ self._client = Client(http_handler).wrap_with_middleware(
265
+ lambda next: AuthMiddleware(next)
266
+ )
267
+ if credentials is not None and credentials_provider is not None:
268
+ warnings.warn(
269
+ "Both credentials and credentials_provider given; provider takes precedence"
270
+ )
271
+ resolved_credentials_provider: IdentityProvider[Credentials] | None = (
272
+ credentials_provider
273
+ )
274
+ if resolved_credentials_provider is None and credentials is not None:
275
+ resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
276
+ if resolved_credentials_provider is None and credentials is None:
277
+ resolved_credentials_provider = default_aws_credentials_chain(
278
+ Client(http_handler)
279
+ )
280
+ self._config = CodeBuildClientConfig(
281
+ {
282
+ "operation_interceptors": operation_interceptors or [],
283
+ "retry_max_attempts": retry_max_attempts,
284
+ "region": region,
285
+ "use_dual_stack": use_dual_stack,
286
+ "use_fips": use_fips,
287
+ "endpoint": endpoint,
288
+ "credentials_provider": resolved_credentials_provider,
289
+ }
290
+ )
291
+
292
+ def operation_options(
293
+ self, config_overrides: Optional[CodeBuildClientConfig] = None
294
+ ) -> tuple[Iterable[Interceptor[Any, Any]], OperationOptions]:
295
+ overrides: CodeBuildClientConfig = config_overrides or {}
296
+ interceptors_: list[Interceptor[Any, Any]] = [
297
+ *overrides.get(
298
+ "operation_interceptors", self._config.get("operation_interceptors", [])
299
+ ),
300
+ aws_config(),
301
+ retry(),
302
+ ]
303
+ options_: OperationOptions = OperationOptions(
304
+ client=self._client,
305
+ retry_max_attempts=overrides.get(
306
+ "retry_max_attempts", self._config.get("retry_max_attempts")
307
+ ),
308
+ region=overrides.get("region", self._config.get("region")),
309
+ use_dual_stack=overrides.get(
310
+ "use_dual_stack", self._config.get("use_dual_stack")
311
+ ),
312
+ use_fips=overrides.get("use_fips", self._config.get("use_fips")),
313
+ endpoint=overrides.get("endpoint", self._config.get("endpoint")),
314
+ credentials_provider=overrides.get(
315
+ "credentials_provider", self._config.get("credentials_provider")
316
+ ),
317
+ )
318
+ return interceptors_, options_
319
+
320
+ def batch_delete_builds(
321
+ self,
322
+ ids: "capo_codebuild.types.build_ids.BuildIds",
323
+ *,
324
+ config_overrides: Optional[CodeBuildClientConfig] = None,
325
+ ) -> "capo_codebuild.types.batch_delete_builds_output.BatchDeleteBuildsOutput":
326
+ """<p>Deletes one or more builds.</p>
327
+
328
+ Args:
329
+ ids: <p>The IDs of the builds to delete.</p>
330
+
331
+ Raises:
332
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
333
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
334
+ """
335
+
336
+ def _handler(
337
+ req: "OperationRequest[capo_codebuild.types.batch_delete_builds_input.BatchDeleteBuildsInput]",
338
+ ) -> OperationResponse[
339
+ "capo_codebuild.types.batch_delete_builds_output.BatchDeleteBuildsOutput"
340
+ ]:
341
+ import capo_codebuild._operations.code_build_20161006.batch_delete_builds
342
+
343
+ output, http_response = (
344
+ capo_codebuild._operations.code_build_20161006.batch_delete_builds.batch_delete_builds(
345
+ req.options, req.input
346
+ )
347
+ )
348
+ return OperationResponse(output=output, response=http_response)
349
+
350
+ interceptors_, options_ = self.operation_options(config_overrides)
351
+ input_: capo_codebuild.types.batch_delete_builds_input.BatchDeleteBuildsInput = {
352
+ "ids": ids
353
+ }
354
+
355
+ response = execute_pipeline(
356
+ OperationRequest(input=input_, options=options_),
357
+ handler=_handler,
358
+ interceptors=list(interceptors_),
359
+ )
360
+ response.response.close()
361
+ return response.output
362
+
363
+ def batch_get_build_batches(
364
+ self,
365
+ ids: "capo_codebuild.types.build_batch_ids.BuildBatchIds",
366
+ *,
367
+ config_overrides: Optional[CodeBuildClientConfig] = None,
368
+ ) -> (
369
+ "capo_codebuild.types.batch_get_build_batches_output.BatchGetBuildBatchesOutput"
370
+ ):
371
+ """<p>Retrieves information about one or more batch builds.</p>
372
+
373
+ Args:
374
+ ids: <p>An array that contains the batch build identifiers to retrieve.</p>
375
+
376
+ Raises:
377
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
378
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
379
+ """
380
+
381
+ def _handler(
382
+ req: "OperationRequest[capo_codebuild.types.batch_get_build_batches_input.BatchGetBuildBatchesInput]",
383
+ ) -> OperationResponse[
384
+ "capo_codebuild.types.batch_get_build_batches_output.BatchGetBuildBatchesOutput"
385
+ ]:
386
+ import capo_codebuild._operations.code_build_20161006.batch_get_build_batches
387
+
388
+ output, http_response = (
389
+ capo_codebuild._operations.code_build_20161006.batch_get_build_batches.batch_get_build_batches(
390
+ req.options, req.input
391
+ )
392
+ )
393
+ return OperationResponse(output=output, response=http_response)
394
+
395
+ interceptors_, options_ = self.operation_options(config_overrides)
396
+ input_: capo_codebuild.types.batch_get_build_batches_input.BatchGetBuildBatchesInput = {
397
+ "ids": ids
398
+ }
399
+
400
+ response = execute_pipeline(
401
+ OperationRequest(input=input_, options=options_),
402
+ handler=_handler,
403
+ interceptors=list(interceptors_),
404
+ )
405
+ response.response.close()
406
+ return response.output
407
+
408
+ def batch_get_builds(
409
+ self,
410
+ ids: "capo_codebuild.types.build_ids.BuildIds",
411
+ *,
412
+ config_overrides: Optional[CodeBuildClientConfig] = None,
413
+ ) -> "capo_codebuild.types.batch_get_builds_output.BatchGetBuildsOutput":
414
+ """<p>Gets information about one or more builds.</p>
415
+
416
+ Args:
417
+ ids: <p>The IDs of the builds.</p>
418
+
419
+ Raises:
420
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
421
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
422
+ """
423
+
424
+ def _handler(
425
+ req: "OperationRequest[capo_codebuild.types.batch_get_builds_input.BatchGetBuildsInput]",
426
+ ) -> OperationResponse[
427
+ "capo_codebuild.types.batch_get_builds_output.BatchGetBuildsOutput"
428
+ ]:
429
+ import capo_codebuild._operations.code_build_20161006.batch_get_builds
430
+
431
+ output, http_response = (
432
+ capo_codebuild._operations.code_build_20161006.batch_get_builds.batch_get_builds(
433
+ req.options, req.input
434
+ )
435
+ )
436
+ return OperationResponse(output=output, response=http_response)
437
+
438
+ interceptors_, options_ = self.operation_options(config_overrides)
439
+ input_: capo_codebuild.types.batch_get_builds_input.BatchGetBuildsInput = {
440
+ "ids": ids
441
+ }
442
+
443
+ response = execute_pipeline(
444
+ OperationRequest(input=input_, options=options_),
445
+ handler=_handler,
446
+ interceptors=list(interceptors_),
447
+ )
448
+ response.response.close()
449
+ return response.output
450
+
451
+ def batch_get_command_executions(
452
+ self,
453
+ sandbox_id: "capo_codebuild.types.non_empty_string.NonEmptyString",
454
+ command_execution_ids: "capo_codebuild.types.command_execution_ids.CommandExecutionIds",
455
+ *,
456
+ config_overrides: Optional[CodeBuildClientConfig] = None,
457
+ ) -> "capo_codebuild.types.batch_get_command_executions_output.BatchGetCommandExecutionsOutput":
458
+ """<p>Gets information about the command executions.</p>
459
+
460
+ Args:
461
+ sandbox_id: <p>A <code>sandboxId</code> or <code>sandboxArn</code>.</p>
462
+ command_execution_ids: <p>A comma separated list of <code>commandExecutionIds</code>.</p>
463
+
464
+ Raises:
465
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
466
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
467
+ """
468
+
469
+ def _handler(
470
+ req: "OperationRequest[capo_codebuild.types.batch_get_command_executions_input.BatchGetCommandExecutionsInput]",
471
+ ) -> OperationResponse[
472
+ "capo_codebuild.types.batch_get_command_executions_output.BatchGetCommandExecutionsOutput"
473
+ ]:
474
+ import capo_codebuild._operations.code_build_20161006.batch_get_command_executions
475
+
476
+ output, http_response = (
477
+ capo_codebuild._operations.code_build_20161006.batch_get_command_executions.batch_get_command_executions(
478
+ req.options, req.input
479
+ )
480
+ )
481
+ return OperationResponse(output=output, response=http_response)
482
+
483
+ interceptors_, options_ = self.operation_options(config_overrides)
484
+ input_: capo_codebuild.types.batch_get_command_executions_input.BatchGetCommandExecutionsInput = {
485
+ "sandbox_id": sandbox_id,
486
+ "command_execution_ids": command_execution_ids,
487
+ }
488
+
489
+ response = execute_pipeline(
490
+ OperationRequest(input=input_, options=options_),
491
+ handler=_handler,
492
+ interceptors=list(interceptors_),
493
+ )
494
+ response.response.close()
495
+ return response.output
496
+
497
+ def batch_get_fleets(
498
+ self,
499
+ names: "capo_codebuild.types.fleet_names.FleetNames",
500
+ *,
501
+ config_overrides: Optional[CodeBuildClientConfig] = None,
502
+ ) -> "capo_codebuild.types.batch_get_fleets_output.BatchGetFleetsOutput":
503
+ """<p>Gets information about one or more compute fleets.</p>
504
+
505
+ Args:
506
+ names: <p>The names or ARNs of the compute fleets.</p>
507
+
508
+ Raises:
509
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
510
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
511
+ """
512
+
513
+ def _handler(
514
+ req: "OperationRequest[capo_codebuild.types.batch_get_fleets_input.BatchGetFleetsInput]",
515
+ ) -> OperationResponse[
516
+ "capo_codebuild.types.batch_get_fleets_output.BatchGetFleetsOutput"
517
+ ]:
518
+ import capo_codebuild._operations.code_build_20161006.batch_get_fleets
519
+
520
+ output, http_response = (
521
+ capo_codebuild._operations.code_build_20161006.batch_get_fleets.batch_get_fleets(
522
+ req.options, req.input
523
+ )
524
+ )
525
+ return OperationResponse(output=output, response=http_response)
526
+
527
+ interceptors_, options_ = self.operation_options(config_overrides)
528
+ input_: capo_codebuild.types.batch_get_fleets_input.BatchGetFleetsInput = {
529
+ "names": names
530
+ }
531
+
532
+ response = execute_pipeline(
533
+ OperationRequest(input=input_, options=options_),
534
+ handler=_handler,
535
+ interceptors=list(interceptors_),
536
+ )
537
+ response.response.close()
538
+ return response.output
539
+
540
+ def batch_get_projects(
541
+ self,
542
+ names: "capo_codebuild.types.project_names.ProjectNames",
543
+ *,
544
+ config_overrides: Optional[CodeBuildClientConfig] = None,
545
+ ) -> "capo_codebuild.types.batch_get_projects_output.BatchGetProjectsOutput":
546
+ """<p>Gets information about one or more build projects.</p>
547
+
548
+ Args:
549
+ names: <p>The names or ARNs of the build projects. To get information about a project shared with your Amazon Web Services account, its ARN must be specified. You cannot specify a shared project using its name.</p>
550
+
551
+ Raises:
552
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
553
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
554
+ """
555
+
556
+ def _handler(
557
+ req: "OperationRequest[capo_codebuild.types.batch_get_projects_input.BatchGetProjectsInput]",
558
+ ) -> OperationResponse[
559
+ "capo_codebuild.types.batch_get_projects_output.BatchGetProjectsOutput"
560
+ ]:
561
+ import capo_codebuild._operations.code_build_20161006.batch_get_projects
562
+
563
+ output, http_response = (
564
+ capo_codebuild._operations.code_build_20161006.batch_get_projects.batch_get_projects(
565
+ req.options, req.input
566
+ )
567
+ )
568
+ return OperationResponse(output=output, response=http_response)
569
+
570
+ interceptors_, options_ = self.operation_options(config_overrides)
571
+ input_: capo_codebuild.types.batch_get_projects_input.BatchGetProjectsInput = {
572
+ "names": names
573
+ }
574
+
575
+ response = execute_pipeline(
576
+ OperationRequest(input=input_, options=options_),
577
+ handler=_handler,
578
+ interceptors=list(interceptors_),
579
+ )
580
+ response.response.close()
581
+ return response.output
582
+
583
+ def batch_get_report_groups(
584
+ self,
585
+ report_group_arns: "capo_codebuild.types.report_group_arns.ReportGroupArns",
586
+ *,
587
+ config_overrides: Optional[CodeBuildClientConfig] = None,
588
+ ) -> (
589
+ "capo_codebuild.types.batch_get_report_groups_output.BatchGetReportGroupsOutput"
590
+ ):
591
+ """<p> Returns an array of report groups. </p>
592
+
593
+ Args:
594
+ report_group_arns: <p> An array of report group ARNs that identify the report groups to return. </p>
595
+
596
+ Raises:
597
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
598
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
599
+ """
600
+
601
+ def _handler(
602
+ req: "OperationRequest[capo_codebuild.types.batch_get_report_groups_input.BatchGetReportGroupsInput]",
603
+ ) -> OperationResponse[
604
+ "capo_codebuild.types.batch_get_report_groups_output.BatchGetReportGroupsOutput"
605
+ ]:
606
+ import capo_codebuild._operations.code_build_20161006.batch_get_report_groups
607
+
608
+ output, http_response = (
609
+ capo_codebuild._operations.code_build_20161006.batch_get_report_groups.batch_get_report_groups(
610
+ req.options, req.input
611
+ )
612
+ )
613
+ return OperationResponse(output=output, response=http_response)
614
+
615
+ interceptors_, options_ = self.operation_options(config_overrides)
616
+ input_: capo_codebuild.types.batch_get_report_groups_input.BatchGetReportGroupsInput = {
617
+ "report_group_arns": report_group_arns
618
+ }
619
+
620
+ response = execute_pipeline(
621
+ OperationRequest(input=input_, options=options_),
622
+ handler=_handler,
623
+ interceptors=list(interceptors_),
624
+ )
625
+ response.response.close()
626
+ return response.output
627
+
628
+ def batch_get_reports(
629
+ self,
630
+ report_arns: "capo_codebuild.types.report_arns.ReportArns",
631
+ *,
632
+ config_overrides: Optional[CodeBuildClientConfig] = None,
633
+ ) -> "capo_codebuild.types.batch_get_reports_output.BatchGetReportsOutput":
634
+ """<p> Returns an array of reports. </p>
635
+
636
+ Args:
637
+ report_arns: <p> An array of ARNs that identify the <code>Report</code> objects to return. </p>
638
+
639
+ Raises:
640
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
641
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
642
+ """
643
+
644
+ def _handler(
645
+ req: "OperationRequest[capo_codebuild.types.batch_get_reports_input.BatchGetReportsInput]",
646
+ ) -> OperationResponse[
647
+ "capo_codebuild.types.batch_get_reports_output.BatchGetReportsOutput"
648
+ ]:
649
+ import capo_codebuild._operations.code_build_20161006.batch_get_reports
650
+
651
+ output, http_response = (
652
+ capo_codebuild._operations.code_build_20161006.batch_get_reports.batch_get_reports(
653
+ req.options, req.input
654
+ )
655
+ )
656
+ return OperationResponse(output=output, response=http_response)
657
+
658
+ interceptors_, options_ = self.operation_options(config_overrides)
659
+ input_: capo_codebuild.types.batch_get_reports_input.BatchGetReportsInput = {
660
+ "report_arns": report_arns
661
+ }
662
+
663
+ response = execute_pipeline(
664
+ OperationRequest(input=input_, options=options_),
665
+ handler=_handler,
666
+ interceptors=list(interceptors_),
667
+ )
668
+ response.response.close()
669
+ return response.output
670
+
671
+ def batch_get_sandboxes(
672
+ self,
673
+ ids: "capo_codebuild.types.sandbox_ids.SandboxIds",
674
+ *,
675
+ config_overrides: Optional[CodeBuildClientConfig] = None,
676
+ ) -> "capo_codebuild.types.batch_get_sandboxes_output.BatchGetSandboxesOutput":
677
+ """<p>Gets information about the sandbox status.</p>
678
+
679
+ Args:
680
+ ids: <p>A comma separated list of <code>sandboxIds</code> or <code>sandboxArns</code>.</p>
681
+
682
+ Raises:
683
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
684
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
685
+ """
686
+
687
+ def _handler(
688
+ req: "OperationRequest[capo_codebuild.types.batch_get_sandboxes_input.BatchGetSandboxesInput]",
689
+ ) -> OperationResponse[
690
+ "capo_codebuild.types.batch_get_sandboxes_output.BatchGetSandboxesOutput"
691
+ ]:
692
+ import capo_codebuild._operations.code_build_20161006.batch_get_sandboxes
693
+
694
+ output, http_response = (
695
+ capo_codebuild._operations.code_build_20161006.batch_get_sandboxes.batch_get_sandboxes(
696
+ req.options, req.input
697
+ )
698
+ )
699
+ return OperationResponse(output=output, response=http_response)
700
+
701
+ interceptors_, options_ = self.operation_options(config_overrides)
702
+ input_: capo_codebuild.types.batch_get_sandboxes_input.BatchGetSandboxesInput = {
703
+ "ids": ids
704
+ }
705
+
706
+ response = execute_pipeline(
707
+ OperationRequest(input=input_, options=options_),
708
+ handler=_handler,
709
+ interceptors=list(interceptors_),
710
+ )
711
+ response.response.close()
712
+ return response.output
713
+
714
+ def create_fleet(
715
+ self,
716
+ name: "capo_codebuild.types.fleet_name.FleetName",
717
+ base_capacity: "capo_codebuild.types.fleet_capacity.FleetCapacity",
718
+ environment_type: "capo_codebuild.types.environment_type.EnvironmentType",
719
+ compute_type: "capo_codebuild.types.compute_type.ComputeType",
720
+ *,
721
+ config_overrides: Optional[CodeBuildClientConfig] = None,
722
+ compute_configuration: Optional[
723
+ "capo_codebuild.types.compute_configuration.ComputeConfiguration"
724
+ ] = None,
725
+ scaling_configuration: Optional[
726
+ "capo_codebuild.types.scaling_configuration_input.ScalingConfigurationInput"
727
+ ] = None,
728
+ overflow_behavior: Optional[
729
+ "capo_codebuild.types.fleet_overflow_behavior.FleetOverflowBehavior"
730
+ ] = None,
731
+ vpc_config: Optional["capo_codebuild.types.vpc_config.VpcConfig"] = None,
732
+ proxy_configuration: Optional[
733
+ "capo_codebuild.types.proxy_configuration.ProxyConfiguration"
734
+ ] = None,
735
+ image_id: Optional[
736
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
737
+ ] = None,
738
+ fleet_service_role: Optional[
739
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
740
+ ] = None,
741
+ tags: Optional["capo_codebuild.types.tag_list.TagList"] = None,
742
+ ) -> "capo_codebuild.types.create_fleet_output.CreateFleetOutput":
743
+ r"""<p>Creates a compute fleet.</p>
744
+
745
+ Args:
746
+ name: <p>The name of the compute fleet.</p>
747
+ base_capacity: <p>The initial number of machines allocated to the fleet, which defines the number of builds that can run in parallel.</p>
748
+ environment_type: <p>The environment type of the compute fleet.</p> <ul> <li> <p>The environment type <code>ARM_CONTAINER</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).</p> </li> <li> <p>The environment type <code>ARM_EC2</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).</p> </li> <li> <p>The environment type <code>LINUX_CONTAINER</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).</p> </li> <li> <p>The environment type <code>LINUX_EC2</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).</p> </li> <li> <p>The environment type <code>LINUX_GPU_CONTAINER</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney).</p> </li> <li> <p>The environment type <code>MAC_ARM</code> is available for Medium fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)</p> </li> <li> <p>The environment type <code>MAC_ARM</code> is available for Large fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney).</p> </li> <li> <p>The environment type <code>WINDOWS_EC2</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).</p> </li> <li> <p>The environment type <code>WINDOWS_SERVER_2019_CONTAINER</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland).</p> </li> <li> <p>The environment type <code>WINDOWS_SERVER_2022_CONTAINER</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).</p> </li> </ul> <p>For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html\">Build environment compute types</a> in the <i>CodeBuild user guide</i>.</p>
749
+ compute_type: <p>Information about the compute resources the compute fleet uses. Available values include:</p> <ul> <li> <p> <code>ATTRIBUTE_BASED_COMPUTE</code>: Specify the amount of vCPUs, memory, disk space, and the type of machine.</p> <note> <p> If you use <code>ATTRIBUTE_BASED_COMPUTE</code>, you must define your attributes by using <code>computeConfiguration</code>. CodeBuild will select the cheapest instance that satisfies your specified attributes. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.types\">Reserved capacity environment types</a> in the <i>CodeBuild User Guide</i>.</p> </note> </li> <li> <p> <code>CUSTOM_INSTANCE_TYPE</code>: Specify the instance type for your compute fleet. For a list of supported instance types, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types\">Supported instance families </a> in the <i>CodeBuild User Guide</i>.</p> </li> <li> <p> <code>BUILD_GENERAL1_SMALL</code>: Use up to 4 GiB memory and 2 vCPUs for builds.</p> </li> <li> <p> <code>BUILD_GENERAL1_MEDIUM</code>: Use up to 8 GiB memory and 4 vCPUs for builds.</p> </li> <li> <p> <code>BUILD_GENERAL1_LARGE</code>: Use up to 16 GiB memory and 8 vCPUs for builds, depending on your environment type.</p> </li> <li> <p> <code>BUILD_GENERAL1_XLARGE</code>: Use up to 72 GiB memory and 36 vCPUs for builds, depending on your environment type.</p> </li> <li> <p> <code>BUILD_GENERAL1_2XLARGE</code>: Use up to 144 GiB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed.</p> </li> <li> <p> <code>BUILD_LAMBDA_1GB</code>: Use up to 1 GiB memory for builds. Only available for environment type <code>LINUX_LAMBDA_CONTAINER</code> and <code>ARM_LAMBDA_CONTAINER</code>.</p> </li> <li> <p> <code>BUILD_LAMBDA_2GB</code>: Use up to 2 GiB memory for builds. Only available for environment type <code>LINUX_LAMBDA_CONTAINER</code> and <code>ARM_LAMBDA_CONTAINER</code>.</p> </li> <li> <p> <code>BUILD_LAMBDA_4GB</code>: Use up to 4 GiB memory for builds. Only available for environment type <code>LINUX_LAMBDA_CONTAINER</code> and <code>ARM_LAMBDA_CONTAINER</code>.</p> </li> <li> <p> <code>BUILD_LAMBDA_8GB</code>: Use up to 8 GiB memory for builds. Only available for environment type <code>LINUX_LAMBDA_CONTAINER</code> and <code>ARM_LAMBDA_CONTAINER</code>.</p> </li> <li> <p> <code>BUILD_LAMBDA_10GB</code>: Use up to 10 GiB memory for builds. Only available for environment type <code>LINUX_LAMBDA_CONTAINER</code> and <code>ARM_LAMBDA_CONTAINER</code>.</p> </li> </ul> <p> If you use <code>BUILD_GENERAL1_SMALL</code>: </p> <ul> <li> <p> For environment type <code>LINUX_CONTAINER</code>, you can use up to 4 GiB memory and 2 vCPUs for builds. </p> </li> <li> <p> For environment type <code>LINUX_GPU_CONTAINER</code>, you can use up to 16 GiB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds.</p> </li> <li> <p> For environment type <code>ARM_CONTAINER</code>, you can use up to 4 GiB memory and 2 vCPUs on ARM-based processors for builds.</p> </li> </ul> <p> If you use <code>BUILD_GENERAL1_LARGE</code>: </p> <ul> <li> <p> For environment type <code>LINUX_CONTAINER</code>, you can use up to 16 GiB memory and 8 vCPUs for builds. </p> </li> <li> <p> For environment type <code>LINUX_GPU_CONTAINER</code>, you can use up to 255 GiB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds.</p> </li> <li> <p> For environment type <code>ARM_CONTAINER</code>, you can use up to 16 GiB memory and 8 vCPUs on ARM-based processors for builds.</p> </li> </ul> <p>For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types\">On-demand environment types</a> in the <i>CodeBuild User Guide.</i> </p>
750
+ compute_configuration: <p>The compute configuration of the compute fleet. This is only required if <code>computeType</code> is set to <code>ATTRIBUTE_BASED_COMPUTE</code> or <code>CUSTOM_INSTANCE_TYPE</code>.</p>
751
+ scaling_configuration: <p>The scaling configuration of the compute fleet.</p>
752
+ overflow_behavior: <p>The compute fleet overflow behavior.</p> <ul> <li> <p>For overflow behavior <code>QUEUE</code>, your overflow builds need to wait on the existing fleet instance to become available.</p> </li> <li> <p>For overflow behavior <code>ON_DEMAND</code>, your overflow builds run on CodeBuild on-demand.</p> <note> <p>If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you add the required VPC permissions to your project service role. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-create-vpc-network-interface\">Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface</a>.</p> </note> </li> </ul>
753
+ proxy_configuration: <p>The proxy configuration of the compute fleet.</p>
754
+ image_id: <p>The Amazon Machine Image (AMI) of the compute fleet.</p>
755
+ fleet_service_role: <p>The service role associated with the compute fleet. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-permission-policy-fleet-service-role.html\"> Allow a user to add a permission policy for a fleet service role</a> in the <i>CodeBuild User Guide</i>.</p>
756
+ tags: <p>A list of tag key and value pairs associated with this compute fleet.</p> <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.</p>
757
+
758
+ Raises:
759
+ capo_codebuild.errors.account_limit_exceeded_exception.AccountLimitExceededException: <p>An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.</p>
760
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
761
+ capo_codebuild.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.</p>
762
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
763
+ """
764
+
765
+ def _handler(
766
+ req: "OperationRequest[capo_codebuild.types.create_fleet_input.CreateFleetInput]",
767
+ ) -> OperationResponse[
768
+ "capo_codebuild.types.create_fleet_output.CreateFleetOutput"
769
+ ]:
770
+ import capo_codebuild._operations.code_build_20161006.create_fleet
771
+
772
+ output, http_response = (
773
+ capo_codebuild._operations.code_build_20161006.create_fleet.create_fleet(
774
+ req.options, req.input
775
+ )
776
+ )
777
+ return OperationResponse(output=output, response=http_response)
778
+
779
+ interceptors_, options_ = self.operation_options(config_overrides)
780
+ input_: capo_codebuild.types.create_fleet_input.CreateFleetInput = {
781
+ "name": name,
782
+ "base_capacity": base_capacity,
783
+ "environment_type": environment_type,
784
+ "compute_type": compute_type,
785
+ }
786
+ if compute_configuration is not None:
787
+ input_["compute_configuration"] = compute_configuration
788
+ if scaling_configuration is not None:
789
+ input_["scaling_configuration"] = scaling_configuration
790
+ if overflow_behavior is not None:
791
+ input_["overflow_behavior"] = overflow_behavior
792
+ if vpc_config is not None:
793
+ input_["vpc_config"] = vpc_config
794
+ if proxy_configuration is not None:
795
+ input_["proxy_configuration"] = proxy_configuration
796
+ if image_id is not None:
797
+ input_["image_id"] = image_id
798
+ if fleet_service_role is not None:
799
+ input_["fleet_service_role"] = fleet_service_role
800
+ if tags is not None:
801
+ input_["tags"] = tags
802
+
803
+ response = execute_pipeline(
804
+ OperationRequest(input=input_, options=options_),
805
+ handler=_handler,
806
+ interceptors=list(interceptors_),
807
+ )
808
+ response.response.close()
809
+ return response.output
810
+
811
+ def create_project(
812
+ self,
813
+ name: "capo_codebuild.types.project_name.ProjectName",
814
+ source: "capo_codebuild.types.project_source.ProjectSource",
815
+ artifacts: "capo_codebuild.types.project_artifacts.ProjectArtifacts",
816
+ environment: "capo_codebuild.types.project_environment.ProjectEnvironment",
817
+ service_role: "capo_codebuild.types.non_empty_string.NonEmptyString",
818
+ *,
819
+ config_overrides: Optional[CodeBuildClientConfig] = None,
820
+ description: Optional[
821
+ "capo_codebuild.types.project_description.ProjectDescription"
822
+ ] = None,
823
+ secondary_sources: Optional[
824
+ "capo_codebuild.types.project_sources.ProjectSources"
825
+ ] = None,
826
+ source_version: Optional["capo_codebuild.types.string.String"] = None,
827
+ secondary_source_versions: Optional[
828
+ "capo_codebuild.types.project_secondary_source_versions.ProjectSecondarySourceVersions"
829
+ ] = None,
830
+ secondary_artifacts: Optional[
831
+ "capo_codebuild.types.project_artifacts_list.ProjectArtifactsList"
832
+ ] = None,
833
+ cache: Optional["capo_codebuild.types.project_cache.ProjectCache"] = None,
834
+ timeout_in_minutes: Optional[
835
+ "capo_codebuild.types.build_time_out.BuildTimeOut"
836
+ ] = None,
837
+ queued_timeout_in_minutes: Optional[
838
+ "capo_codebuild.types.time_out.TimeOut"
839
+ ] = None,
840
+ encryption_key: Optional[
841
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
842
+ ] = None,
843
+ tags: Optional["capo_codebuild.types.tag_list.TagList"] = None,
844
+ vpc_config: Optional["capo_codebuild.types.vpc_config.VpcConfig"] = None,
845
+ badge_enabled: Optional[
846
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
847
+ ] = None,
848
+ logs_config: Optional["capo_codebuild.types.logs_config.LogsConfig"] = None,
849
+ file_system_locations: Optional[
850
+ "capo_codebuild.types.project_file_system_locations.ProjectFileSystemLocations"
851
+ ] = None,
852
+ build_batch_config: Optional[
853
+ "capo_codebuild.types.project_build_batch_config.ProjectBuildBatchConfig"
854
+ ] = None,
855
+ concurrent_build_limit: Optional[
856
+ "capo_codebuild.types.wrapper_int.WrapperInt"
857
+ ] = None,
858
+ auto_retry_limit: Optional[
859
+ "capo_codebuild.types.wrapper_int.WrapperInt"
860
+ ] = None,
861
+ ) -> "capo_codebuild.types.create_project_output.CreateProjectOutput":
862
+ r"""<p>Creates a build project.</p>
863
+
864
+ Args:
865
+ name: <p>The name of the build project.</p>
866
+ description: <p>A description that makes the build project easy to identify.</p>
867
+ source: <p>Information about the build input source code for the build project.</p>
868
+ secondary_sources: <p>An array of <code>ProjectSource</code> objects. </p>
869
+ source_version: <p>A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of: </p> <ul> <li> <p>For CodeCommit: the commit ID, branch, or Git tag to use.</p> </li> <li> <p>For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p> </li> <li> <p>For GitLab: the commit ID, branch, or Git tag to use.</p> </li> <li> <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p> </li> <li> <p>For Amazon S3: the version ID of the object that represents the build input ZIP file to use.</p> </li> </ul> <p>If <code>sourceVersion</code> is specified at the build level, then that version takes precedence over this <code>sourceVersion</code> (at the project level). </p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html\">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>. </p>
870
+ secondary_source_versions: <p>An array of <code>ProjectSourceVersion</code> objects. If <code>secondarySourceVersions</code> is specified at the build level, then they take precedence over these <code>secondarySourceVersions</code> (at the project level). </p>
871
+ artifacts: <p>Information about the build output artifacts for the build project.</p>
872
+ secondary_artifacts: <p>An array of <code>ProjectArtifacts</code> objects. </p>
873
+ cache: <p>Stores recently used information so that it can be quickly accessed at a later time.</p>
874
+ environment: <p>Information about the build environment for the build project.</p>
875
+ service_role: <p>The ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.</p>
876
+ timeout_in_minutes: <p>How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before it times out any build that has not been marked as completed. The default is 60 minutes.</p>
877
+ queued_timeout_in_minutes: <p>The number of minutes a build is allowed to be queued before it times out. </p>
878
+ encryption_key: <p>The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.</p> <note> <p>You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key. </p> </note> <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/<alias-name></code>). </p>
879
+ tags: <p>A list of tag key and value pairs associated with this build project.</p> <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.</p>
880
+ vpc_config: <p>VpcConfig enables CodeBuild to access resources in an Amazon VPC.</p> <note> <p>If you're using compute fleets during project creation, do not provide vpcConfig.</p> </note>
881
+ badge_enabled: <p>Set this to true to generate a publicly accessible URL for your project's build badge.</p>
882
+ logs_config: <p>Information about logs for the build project. These can be logs in CloudWatch Logs, logs uploaded to a specified S3 bucket, or both. </p>
883
+ file_system_locations: <p> An array of <code>ProjectFileSystemLocation</code> objects for a CodeBuild build project. A <code>ProjectFileSystemLocation</code> object specifies the <code>identifier</code>, <code>location</code>, <code>mountOptions</code>, <code>mountPoint</code>, and <code>type</code> of a file system created using Amazon Elastic File System. </p>
884
+ build_batch_config: <p>A <a>ProjectBuildBatchConfig</a> object that defines the batch build options for the project.</p>
885
+ concurrent_build_limit: <p>The maximum number of concurrent builds that are allowed for this project.</p> <p>New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.</p>
886
+ auto_retry_limit: <p>The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically retry your build for up to 2 additional times.</p>
887
+
888
+ Raises:
889
+ capo_codebuild.errors.account_limit_exceeded_exception.AccountLimitExceededException: <p>An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.</p>
890
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
891
+ capo_codebuild.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.</p>
892
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
893
+ """
894
+
895
+ def _handler(
896
+ req: "OperationRequest[capo_codebuild.types.create_project_input.CreateProjectInput]",
897
+ ) -> OperationResponse[
898
+ "capo_codebuild.types.create_project_output.CreateProjectOutput"
899
+ ]:
900
+ import capo_codebuild._operations.code_build_20161006.create_project
901
+
902
+ output, http_response = (
903
+ capo_codebuild._operations.code_build_20161006.create_project.create_project(
904
+ req.options, req.input
905
+ )
906
+ )
907
+ return OperationResponse(output=output, response=http_response)
908
+
909
+ interceptors_, options_ = self.operation_options(config_overrides)
910
+ input_: capo_codebuild.types.create_project_input.CreateProjectInput = {
911
+ "name": name,
912
+ "source": source,
913
+ "artifacts": artifacts,
914
+ "environment": environment,
915
+ "service_role": service_role,
916
+ }
917
+ if description is not None:
918
+ input_["description"] = description
919
+ if secondary_sources is not None:
920
+ input_["secondary_sources"] = secondary_sources
921
+ if source_version is not None:
922
+ input_["source_version"] = source_version
923
+ if secondary_source_versions is not None:
924
+ input_["secondary_source_versions"] = secondary_source_versions
925
+ if secondary_artifacts is not None:
926
+ input_["secondary_artifacts"] = secondary_artifacts
927
+ if cache is not None:
928
+ input_["cache"] = cache
929
+ if timeout_in_minutes is not None:
930
+ input_["timeout_in_minutes"] = timeout_in_minutes
931
+ if queued_timeout_in_minutes is not None:
932
+ input_["queued_timeout_in_minutes"] = queued_timeout_in_minutes
933
+ if encryption_key is not None:
934
+ input_["encryption_key"] = encryption_key
935
+ if tags is not None:
936
+ input_["tags"] = tags
937
+ if vpc_config is not None:
938
+ input_["vpc_config"] = vpc_config
939
+ if badge_enabled is not None:
940
+ input_["badge_enabled"] = badge_enabled
941
+ if logs_config is not None:
942
+ input_["logs_config"] = logs_config
943
+ if file_system_locations is not None:
944
+ input_["file_system_locations"] = file_system_locations
945
+ if build_batch_config is not None:
946
+ input_["build_batch_config"] = build_batch_config
947
+ if concurrent_build_limit is not None:
948
+ input_["concurrent_build_limit"] = concurrent_build_limit
949
+ if auto_retry_limit is not None:
950
+ input_["auto_retry_limit"] = auto_retry_limit
951
+
952
+ response = execute_pipeline(
953
+ OperationRequest(input=input_, options=options_),
954
+ handler=_handler,
955
+ interceptors=list(interceptors_),
956
+ )
957
+ response.response.close()
958
+ return response.output
959
+
960
+ def create_report_group(
961
+ self,
962
+ name: "capo_codebuild.types.report_group_name.ReportGroupName",
963
+ type: "capo_codebuild.types.report_type.ReportType",
964
+ export_config: "capo_codebuild.types.report_export_config.ReportExportConfig",
965
+ *,
966
+ config_overrides: Optional[CodeBuildClientConfig] = None,
967
+ tags: Optional["capo_codebuild.types.tag_list.TagList"] = None,
968
+ ) -> "capo_codebuild.types.create_report_group_output.CreateReportGroupOutput":
969
+ """<p> Creates a report group. A report group contains a collection of reports. </p>
970
+
971
+ Args:
972
+ name: <p> The name of the report group. </p>
973
+ type: <p> The type of report group. </p>
974
+ export_config: <p> A <code>ReportExportConfig</code> object that contains information about where the report group test results are exported. </p>
975
+ tags: <p> A list of tag key and value pairs associated with this report group. </p> <p>These tags are available for use by Amazon Web Services services that support CodeBuild report group tags.</p>
976
+
977
+ Raises:
978
+ capo_codebuild.errors.account_limit_exceeded_exception.AccountLimitExceededException: <p>An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.</p>
979
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
980
+ capo_codebuild.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.</p>
981
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
982
+ """
983
+
984
+ def _handler(
985
+ req: "OperationRequest[capo_codebuild.types.create_report_group_input.CreateReportGroupInput]",
986
+ ) -> OperationResponse[
987
+ "capo_codebuild.types.create_report_group_output.CreateReportGroupOutput"
988
+ ]:
989
+ import capo_codebuild._operations.code_build_20161006.create_report_group
990
+
991
+ output, http_response = (
992
+ capo_codebuild._operations.code_build_20161006.create_report_group.create_report_group(
993
+ req.options, req.input
994
+ )
995
+ )
996
+ return OperationResponse(output=output, response=http_response)
997
+
998
+ interceptors_, options_ = self.operation_options(config_overrides)
999
+ input_: capo_codebuild.types.create_report_group_input.CreateReportGroupInput = {
1000
+ "name": name,
1001
+ "type": type,
1002
+ "export_config": export_config,
1003
+ }
1004
+ if tags is not None:
1005
+ input_["tags"] = tags
1006
+
1007
+ response = execute_pipeline(
1008
+ OperationRequest(input=input_, options=options_),
1009
+ handler=_handler,
1010
+ interceptors=list(interceptors_),
1011
+ )
1012
+ response.response.close()
1013
+ return response.output
1014
+
1015
+ def create_webhook(
1016
+ self,
1017
+ project_name: "capo_codebuild.types.project_name.ProjectName",
1018
+ *,
1019
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1020
+ branch_filter: Optional["capo_codebuild.types.string.String"] = None,
1021
+ filter_groups: Optional[
1022
+ "capo_codebuild.types.filter_groups.FilterGroups"
1023
+ ] = None,
1024
+ build_type: Optional[
1025
+ "capo_codebuild.types.webhook_build_type.WebhookBuildType"
1026
+ ] = None,
1027
+ manual_creation: Optional[
1028
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
1029
+ ] = None,
1030
+ scope_configuration: Optional[
1031
+ "capo_codebuild.types.scope_configuration.ScopeConfiguration"
1032
+ ] = None,
1033
+ pull_request_build_policy: Optional[
1034
+ "capo_codebuild.types.pull_request_build_policy.PullRequestBuildPolicy"
1035
+ ] = None,
1036
+ ) -> "capo_codebuild.types.create_webhook_output.CreateWebhookOutput":
1037
+ r"""<p>For an existing CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, enables CodeBuild to start rebuilding the source code every time a code change is pushed to the repository.</p> <important> <p>If you enable webhooks for an CodeBuild project, and the project is used as a build step in CodePipeline, then two identical builds are created for each commit. One build is triggered through webhooks, and one through CodePipeline. Because billing is on a per-build basis, you are billed for both builds. Therefore, if you are using CodePipeline, we recommend that you disable webhooks in CodeBuild. In the CodeBuild console, clear the Webhook box. For more information, see step 5 in <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console\">Change a Build Project's Settings</a>.</p> </important>
1038
+
1039
+ Args:
1040
+ project_name: <p>The name of the CodeBuild project.</p>
1041
+ branch_filter: <p>A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If <code>branchFilter</code> is empty, then all branches are built.</p> <note> <p>It is recommended that you use <code>filterGroups</code> instead of <code>branchFilter</code>. </p> </note>
1042
+ filter_groups: <p>An array of arrays of <code>WebhookFilter</code> objects used to determine which webhooks are triggered. At least one <code>WebhookFilter</code> in the array must specify <code>EVENT</code> as its <code>type</code>. </p> <p>For a build to be triggered, at least one filter group in the <code>filterGroups</code> array must pass. For a filter group to pass, each of its filters must pass. </p>
1043
+ build_type: <p>Specifies the type of build this webhook will trigger.</p> <note> <p> <code>RUNNER_BUILDKITE_BUILD</code> is only available for <code>NO_SOURCE</code> source type projects configured for Buildkite runner builds. For more information about CodeBuild-hosted Buildkite runner builds, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/sample-runner-buildkite.html\">Tutorial: Configure a CodeBuild-hosted Buildkite runner</a> in the <i>CodeBuild user guide</i>.</p> </note>
1044
+ manual_creation: <p>If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and instead returns <code>payloadUrl</code> and <code>secret</code> values for the webhook. The <code>payloadUrl</code> and <code>secret</code> values in the output can be used to manually create a webhook within GitHub.</p> <note> <p> <code>manualCreation</code> is only available for GitHub webhooks.</p> </note>
1045
+ scope_configuration: <p>The scope configuration for global or organization webhooks.</p> <note> <p>Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.</p> </note>
1046
+ pull_request_build_policy: <p>A PullRequestBuildPolicy object that defines comment-based approval requirements for triggering builds on pull requests. This policy helps control when automated builds are executed based on contributor permissions and approval workflows.</p>
1047
+
1048
+ Raises:
1049
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1050
+ capo_codebuild.errors.o_auth_provider_exception.OAuthProviderException: <p>There was a problem with the underlying OAuth provider.</p>
1051
+ capo_codebuild.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.</p>
1052
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
1053
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1054
+ """
1055
+
1056
+ def _handler(
1057
+ req: "OperationRequest[capo_codebuild.types.create_webhook_input.CreateWebhookInput]",
1058
+ ) -> OperationResponse[
1059
+ "capo_codebuild.types.create_webhook_output.CreateWebhookOutput"
1060
+ ]:
1061
+ import capo_codebuild._operations.code_build_20161006.create_webhook
1062
+
1063
+ output, http_response = (
1064
+ capo_codebuild._operations.code_build_20161006.create_webhook.create_webhook(
1065
+ req.options, req.input
1066
+ )
1067
+ )
1068
+ return OperationResponse(output=output, response=http_response)
1069
+
1070
+ interceptors_, options_ = self.operation_options(config_overrides)
1071
+ input_: capo_codebuild.types.create_webhook_input.CreateWebhookInput = {
1072
+ "project_name": project_name
1073
+ }
1074
+ if branch_filter is not None:
1075
+ input_["branch_filter"] = branch_filter
1076
+ if filter_groups is not None:
1077
+ input_["filter_groups"] = filter_groups
1078
+ if build_type is not None:
1079
+ input_["build_type"] = build_type
1080
+ if manual_creation is not None:
1081
+ input_["manual_creation"] = manual_creation
1082
+ if scope_configuration is not None:
1083
+ input_["scope_configuration"] = scope_configuration
1084
+ if pull_request_build_policy is not None:
1085
+ input_["pull_request_build_policy"] = pull_request_build_policy
1086
+
1087
+ response = execute_pipeline(
1088
+ OperationRequest(input=input_, options=options_),
1089
+ handler=_handler,
1090
+ interceptors=list(interceptors_),
1091
+ )
1092
+ response.response.close()
1093
+ return response.output
1094
+
1095
+ def delete_build_batch(
1096
+ self,
1097
+ id: "capo_codebuild.types.non_empty_string.NonEmptyString",
1098
+ *,
1099
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1100
+ ) -> "capo_codebuild.types.delete_build_batch_output.DeleteBuildBatchOutput":
1101
+ """<p>Deletes a batch build.</p>
1102
+
1103
+ Args:
1104
+ id: <p>The identifier of the batch build to delete.</p>
1105
+
1106
+ Raises:
1107
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1108
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1109
+ """
1110
+
1111
+ def _handler(
1112
+ req: "OperationRequest[capo_codebuild.types.delete_build_batch_input.DeleteBuildBatchInput]",
1113
+ ) -> OperationResponse[
1114
+ "capo_codebuild.types.delete_build_batch_output.DeleteBuildBatchOutput"
1115
+ ]:
1116
+ import capo_codebuild._operations.code_build_20161006.delete_build_batch
1117
+
1118
+ output, http_response = (
1119
+ capo_codebuild._operations.code_build_20161006.delete_build_batch.delete_build_batch(
1120
+ req.options, req.input
1121
+ )
1122
+ )
1123
+ return OperationResponse(output=output, response=http_response)
1124
+
1125
+ interceptors_, options_ = self.operation_options(config_overrides)
1126
+ input_: capo_codebuild.types.delete_build_batch_input.DeleteBuildBatchInput = {
1127
+ "id": id
1128
+ }
1129
+
1130
+ response = execute_pipeline(
1131
+ OperationRequest(input=input_, options=options_),
1132
+ handler=_handler,
1133
+ interceptors=list(interceptors_),
1134
+ )
1135
+ response.response.close()
1136
+ return response.output
1137
+
1138
+ def delete_fleet(
1139
+ self,
1140
+ arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
1141
+ *,
1142
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1143
+ ) -> "capo_codebuild.types.delete_fleet_output.DeleteFleetOutput":
1144
+ """<p>Deletes a compute fleet. When you delete a compute fleet, its builds are not deleted.</p>
1145
+
1146
+ Args:
1147
+ arn: <p>The ARN of the compute fleet.</p>
1148
+
1149
+ Raises:
1150
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1151
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1152
+ """
1153
+
1154
+ def _handler(
1155
+ req: "OperationRequest[capo_codebuild.types.delete_fleet_input.DeleteFleetInput]",
1156
+ ) -> OperationResponse[
1157
+ "capo_codebuild.types.delete_fleet_output.DeleteFleetOutput"
1158
+ ]:
1159
+ import capo_codebuild._operations.code_build_20161006.delete_fleet
1160
+
1161
+ output, http_response = (
1162
+ capo_codebuild._operations.code_build_20161006.delete_fleet.delete_fleet(
1163
+ req.options, req.input
1164
+ )
1165
+ )
1166
+ return OperationResponse(output=output, response=http_response)
1167
+
1168
+ interceptors_, options_ = self.operation_options(config_overrides)
1169
+ input_: capo_codebuild.types.delete_fleet_input.DeleteFleetInput = {"arn": arn}
1170
+
1171
+ response = execute_pipeline(
1172
+ OperationRequest(input=input_, options=options_),
1173
+ handler=_handler,
1174
+ interceptors=list(interceptors_),
1175
+ )
1176
+ response.response.close()
1177
+ return response.output
1178
+
1179
+ def delete_project(
1180
+ self,
1181
+ name: "capo_codebuild.types.non_empty_string.NonEmptyString",
1182
+ *,
1183
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1184
+ ) -> "capo_codebuild.types.delete_project_output.DeleteProjectOutput":
1185
+ """<p> Deletes a build project. When you delete a project, its builds are not deleted. </p>
1186
+
1187
+ Args:
1188
+ name: <p>The name of the build project.</p>
1189
+
1190
+ Raises:
1191
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1192
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1193
+ """
1194
+
1195
+ def _handler(
1196
+ req: "OperationRequest[capo_codebuild.types.delete_project_input.DeleteProjectInput]",
1197
+ ) -> OperationResponse[
1198
+ "capo_codebuild.types.delete_project_output.DeleteProjectOutput"
1199
+ ]:
1200
+ import capo_codebuild._operations.code_build_20161006.delete_project
1201
+
1202
+ output, http_response = (
1203
+ capo_codebuild._operations.code_build_20161006.delete_project.delete_project(
1204
+ req.options, req.input
1205
+ )
1206
+ )
1207
+ return OperationResponse(output=output, response=http_response)
1208
+
1209
+ interceptors_, options_ = self.operation_options(config_overrides)
1210
+ input_: capo_codebuild.types.delete_project_input.DeleteProjectInput = {
1211
+ "name": name
1212
+ }
1213
+
1214
+ response = execute_pipeline(
1215
+ OperationRequest(input=input_, options=options_),
1216
+ handler=_handler,
1217
+ interceptors=list(interceptors_),
1218
+ )
1219
+ response.response.close()
1220
+ return response.output
1221
+
1222
+ def delete_report(
1223
+ self,
1224
+ arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
1225
+ *,
1226
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1227
+ ) -> "capo_codebuild.types.delete_report_output.DeleteReportOutput":
1228
+ """<p> Deletes a report. </p>
1229
+
1230
+ Args:
1231
+ arn: <p> The ARN of the report to delete. </p>
1232
+
1233
+ Raises:
1234
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1235
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1236
+ """
1237
+
1238
+ def _handler(
1239
+ req: "OperationRequest[capo_codebuild.types.delete_report_input.DeleteReportInput]",
1240
+ ) -> OperationResponse[
1241
+ "capo_codebuild.types.delete_report_output.DeleteReportOutput"
1242
+ ]:
1243
+ import capo_codebuild._operations.code_build_20161006.delete_report
1244
+
1245
+ output, http_response = (
1246
+ capo_codebuild._operations.code_build_20161006.delete_report.delete_report(
1247
+ req.options, req.input
1248
+ )
1249
+ )
1250
+ return OperationResponse(output=output, response=http_response)
1251
+
1252
+ interceptors_, options_ = self.operation_options(config_overrides)
1253
+ input_: capo_codebuild.types.delete_report_input.DeleteReportInput = {
1254
+ "arn": arn
1255
+ }
1256
+
1257
+ response = execute_pipeline(
1258
+ OperationRequest(input=input_, options=options_),
1259
+ handler=_handler,
1260
+ interceptors=list(interceptors_),
1261
+ )
1262
+ response.response.close()
1263
+ return response.output
1264
+
1265
+ def delete_report_group(
1266
+ self,
1267
+ arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
1268
+ *,
1269
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1270
+ delete_reports: Optional["capo_codebuild.types.boolean.Boolean"] = None,
1271
+ ) -> "capo_codebuild.types.delete_report_group_output.DeleteReportGroupOutput":
1272
+ r"""<p>Deletes a report group. Before you delete a report group, you must delete its reports. </p>
1273
+
1274
+ Args:
1275
+ arn: <p>The ARN of the report group to delete. </p>
1276
+ delete_reports: <p>If <code>true</code>, deletes any reports that belong to a report group before deleting the report group. </p> <p>If <code>false</code>, you must delete any reports in the report group. Use <a href=\"https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ListReportsForReportGroup.html\">ListReportsForReportGroup</a> to get the reports in a report group. Use <a href=\"https://docs.aws.amazon.com/codebuild/latest/APIReference/API_DeleteReport.html\">DeleteReport</a> to delete the reports. If you call <code>DeleteReportGroup</code> for a report group that contains one or more reports, an exception is thrown. </p>
1277
+
1278
+ Raises:
1279
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1280
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1281
+ """
1282
+
1283
+ def _handler(
1284
+ req: "OperationRequest[capo_codebuild.types.delete_report_group_input.DeleteReportGroupInput]",
1285
+ ) -> OperationResponse[
1286
+ "capo_codebuild.types.delete_report_group_output.DeleteReportGroupOutput"
1287
+ ]:
1288
+ import capo_codebuild._operations.code_build_20161006.delete_report_group
1289
+
1290
+ output, http_response = (
1291
+ capo_codebuild._operations.code_build_20161006.delete_report_group.delete_report_group(
1292
+ req.options, req.input
1293
+ )
1294
+ )
1295
+ return OperationResponse(output=output, response=http_response)
1296
+
1297
+ interceptors_, options_ = self.operation_options(config_overrides)
1298
+ input_: capo_codebuild.types.delete_report_group_input.DeleteReportGroupInput = {
1299
+ "arn": arn
1300
+ }
1301
+ if delete_reports is not None:
1302
+ input_["delete_reports"] = delete_reports
1303
+
1304
+ response = execute_pipeline(
1305
+ OperationRequest(input=input_, options=options_),
1306
+ handler=_handler,
1307
+ interceptors=list(interceptors_),
1308
+ )
1309
+ response.response.close()
1310
+ return response.output
1311
+
1312
+ def delete_resource_policy(
1313
+ self,
1314
+ resource_arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
1315
+ *,
1316
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1317
+ ) -> (
1318
+ "capo_codebuild.types.delete_resource_policy_output.DeleteResourcePolicyOutput"
1319
+ ):
1320
+ """<p> Deletes a resource policy that is identified by its resource ARN. </p>
1321
+
1322
+ Args:
1323
+ resource_arn: <p> The ARN of the resource that is associated with the resource policy. </p>
1324
+
1325
+ Raises:
1326
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1327
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1328
+ """
1329
+
1330
+ def _handler(
1331
+ req: "OperationRequest[capo_codebuild.types.delete_resource_policy_input.DeleteResourcePolicyInput]",
1332
+ ) -> OperationResponse[
1333
+ "capo_codebuild.types.delete_resource_policy_output.DeleteResourcePolicyOutput"
1334
+ ]:
1335
+ import capo_codebuild._operations.code_build_20161006.delete_resource_policy
1336
+
1337
+ output, http_response = (
1338
+ capo_codebuild._operations.code_build_20161006.delete_resource_policy.delete_resource_policy(
1339
+ req.options, req.input
1340
+ )
1341
+ )
1342
+ return OperationResponse(output=output, response=http_response)
1343
+
1344
+ interceptors_, options_ = self.operation_options(config_overrides)
1345
+ input_: capo_codebuild.types.delete_resource_policy_input.DeleteResourcePolicyInput = {
1346
+ "resource_arn": resource_arn
1347
+ }
1348
+
1349
+ response = execute_pipeline(
1350
+ OperationRequest(input=input_, options=options_),
1351
+ handler=_handler,
1352
+ interceptors=list(interceptors_),
1353
+ )
1354
+ response.response.close()
1355
+ return response.output
1356
+
1357
+ def delete_source_credentials(
1358
+ self,
1359
+ arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
1360
+ *,
1361
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1362
+ ) -> "capo_codebuild.types.delete_source_credentials_output.DeleteSourceCredentialsOutput":
1363
+ """<p> Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials. </p>
1364
+
1365
+ Args:
1366
+ arn: <p> The Amazon Resource Name (ARN) of the token.</p>
1367
+
1368
+ Raises:
1369
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1370
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
1371
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1372
+ """
1373
+
1374
+ def _handler(
1375
+ req: "OperationRequest[capo_codebuild.types.delete_source_credentials_input.DeleteSourceCredentialsInput]",
1376
+ ) -> OperationResponse[
1377
+ "capo_codebuild.types.delete_source_credentials_output.DeleteSourceCredentialsOutput"
1378
+ ]:
1379
+ import capo_codebuild._operations.code_build_20161006.delete_source_credentials
1380
+
1381
+ output, http_response = (
1382
+ capo_codebuild._operations.code_build_20161006.delete_source_credentials.delete_source_credentials(
1383
+ req.options, req.input
1384
+ )
1385
+ )
1386
+ return OperationResponse(output=output, response=http_response)
1387
+
1388
+ interceptors_, options_ = self.operation_options(config_overrides)
1389
+ input_: capo_codebuild.types.delete_source_credentials_input.DeleteSourceCredentialsInput = {
1390
+ "arn": arn
1391
+ }
1392
+
1393
+ response = execute_pipeline(
1394
+ OperationRequest(input=input_, options=options_),
1395
+ handler=_handler,
1396
+ interceptors=list(interceptors_),
1397
+ )
1398
+ response.response.close()
1399
+ return response.output
1400
+
1401
+ def delete_webhook(
1402
+ self,
1403
+ project_name: "capo_codebuild.types.project_name.ProjectName",
1404
+ *,
1405
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1406
+ ) -> "capo_codebuild.types.delete_webhook_output.DeleteWebhookOutput":
1407
+ """<p>For an existing CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, stops CodeBuild from rebuilding the source code every time a code change is pushed to the repository.</p>
1408
+
1409
+ Args:
1410
+ project_name: <p>The name of the CodeBuild project.</p>
1411
+
1412
+ Raises:
1413
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1414
+ capo_codebuild.errors.o_auth_provider_exception.OAuthProviderException: <p>There was a problem with the underlying OAuth provider.</p>
1415
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
1416
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1417
+ """
1418
+
1419
+ def _handler(
1420
+ req: "OperationRequest[capo_codebuild.types.delete_webhook_input.DeleteWebhookInput]",
1421
+ ) -> OperationResponse[
1422
+ "capo_codebuild.types.delete_webhook_output.DeleteWebhookOutput"
1423
+ ]:
1424
+ import capo_codebuild._operations.code_build_20161006.delete_webhook
1425
+
1426
+ output, http_response = (
1427
+ capo_codebuild._operations.code_build_20161006.delete_webhook.delete_webhook(
1428
+ req.options, req.input
1429
+ )
1430
+ )
1431
+ return OperationResponse(output=output, response=http_response)
1432
+
1433
+ interceptors_, options_ = self.operation_options(config_overrides)
1434
+ input_: capo_codebuild.types.delete_webhook_input.DeleteWebhookInput = {
1435
+ "project_name": project_name
1436
+ }
1437
+
1438
+ response = execute_pipeline(
1439
+ OperationRequest(input=input_, options=options_),
1440
+ handler=_handler,
1441
+ interceptors=list(interceptors_),
1442
+ )
1443
+ response.response.close()
1444
+ return response.output
1445
+
1446
+ def describe_code_coverages(
1447
+ self,
1448
+ report_arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
1449
+ *,
1450
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1451
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
1452
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
1453
+ sort_order: Optional[
1454
+ "capo_codebuild.types.sort_order_type.SortOrderType"
1455
+ ] = None,
1456
+ sort_by: Optional[
1457
+ "capo_codebuild.types.report_code_coverage_sort_by_type.ReportCodeCoverageSortByType"
1458
+ ] = None,
1459
+ min_line_coverage_percentage: Optional[
1460
+ "capo_codebuild.types.percentage.Percentage"
1461
+ ] = None,
1462
+ max_line_coverage_percentage: Optional[
1463
+ "capo_codebuild.types.percentage.Percentage"
1464
+ ] = None,
1465
+ ) -> "capo_codebuild.types.describe_code_coverages_output.DescribeCodeCoveragesOutput":
1466
+ """<p>Retrieves one or more code coverage reports.</p>
1467
+
1468
+ Args:
1469
+ report_arn: <p> The ARN of the report for which test cases are returned. </p>
1470
+ next_token: <p>The <code>nextToken</code> value returned from a previous call to <code>DescribeCodeCoverages</code>. This specifies the next item to return. To return the beginning of the list, exclude this parameter.</p>
1471
+ max_results: <p>The maximum number of results to return.</p>
1472
+ sort_order: <p>Specifies if the results are sorted in ascending or descending order.</p>
1473
+ sort_by: <p>Specifies how the results are sorted. Possible values are:</p> <dl> <dt>FILE_PATH</dt> <dd> <p>The results are sorted by file path.</p> </dd> <dt>LINE_COVERAGE_PERCENTAGE</dt> <dd> <p>The results are sorted by the percentage of lines that are covered.</p> </dd> </dl>
1474
+ min_line_coverage_percentage: <p>The minimum line coverage percentage to report.</p>
1475
+ max_line_coverage_percentage: <p>The maximum line coverage percentage to report.</p>
1476
+
1477
+ Raises:
1478
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1479
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1480
+ """
1481
+
1482
+ def _handler(
1483
+ req: "OperationRequest[capo_codebuild.types.describe_code_coverages_input.DescribeCodeCoveragesInput]",
1484
+ ) -> OperationResponse[
1485
+ "capo_codebuild.types.describe_code_coverages_output.DescribeCodeCoveragesOutput"
1486
+ ]:
1487
+ import capo_codebuild._operations.code_build_20161006.describe_code_coverages
1488
+
1489
+ output, http_response = (
1490
+ capo_codebuild._operations.code_build_20161006.describe_code_coverages.describe_code_coverages(
1491
+ req.options, req.input
1492
+ )
1493
+ )
1494
+ return OperationResponse(output=output, response=http_response)
1495
+
1496
+ interceptors_, options_ = self.operation_options(config_overrides)
1497
+ input_: capo_codebuild.types.describe_code_coverages_input.DescribeCodeCoveragesInput = {
1498
+ "report_arn": report_arn
1499
+ }
1500
+ if next_token is not None:
1501
+ input_["next_token"] = next_token
1502
+ if max_results is not None:
1503
+ input_["max_results"] = max_results
1504
+ if sort_order is not None:
1505
+ input_["sort_order"] = sort_order
1506
+ if sort_by is not None:
1507
+ input_["sort_by"] = sort_by
1508
+ if min_line_coverage_percentage is not None:
1509
+ input_["min_line_coverage_percentage"] = min_line_coverage_percentage
1510
+ if max_line_coverage_percentage is not None:
1511
+ input_["max_line_coverage_percentage"] = max_line_coverage_percentage
1512
+
1513
+ response = execute_pipeline(
1514
+ OperationRequest(input=input_, options=options_),
1515
+ handler=_handler,
1516
+ interceptors=list(interceptors_),
1517
+ )
1518
+ response.response.close()
1519
+ return response.output
1520
+
1521
+ def iter_describe_code_coverages(
1522
+ self,
1523
+ report_arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
1524
+ *,
1525
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1526
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
1527
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
1528
+ sort_order: Optional[
1529
+ "capo_codebuild.types.sort_order_type.SortOrderType"
1530
+ ] = None,
1531
+ sort_by: Optional[
1532
+ "capo_codebuild.types.report_code_coverage_sort_by_type.ReportCodeCoverageSortByType"
1533
+ ] = None,
1534
+ min_line_coverage_percentage: Optional[
1535
+ "capo_codebuild.types.percentage.Percentage"
1536
+ ] = None,
1537
+ max_line_coverage_percentage: Optional[
1538
+ "capo_codebuild.types.percentage.Percentage"
1539
+ ] = None,
1540
+ ) -> "Iterator[capo_codebuild.types.code_coverage.CodeCoverage]":
1541
+ _token = next_token
1542
+ while True:
1543
+ _response = self.describe_code_coverages(
1544
+ report_arn,
1545
+ config_overrides=config_overrides,
1546
+ next_token=_token,
1547
+ max_results=max_results,
1548
+ sort_order=sort_order,
1549
+ sort_by=sort_by,
1550
+ min_line_coverage_percentage=min_line_coverage_percentage,
1551
+ max_line_coverage_percentage=max_line_coverage_percentage,
1552
+ )
1553
+ _page = _resolve_path(_response, ("code_coverages",))
1554
+ for _item in _page or []:
1555
+ yield _item
1556
+ _token = _resolve_path(_response, ("next_token",))
1557
+ if not _token:
1558
+ break
1559
+
1560
+ def describe_test_cases(
1561
+ self,
1562
+ report_arn: "capo_codebuild.types.string.String",
1563
+ *,
1564
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1565
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
1566
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
1567
+ filter: Optional["capo_codebuild.types.test_case_filter.TestCaseFilter"] = None,
1568
+ ) -> "capo_codebuild.types.describe_test_cases_output.DescribeTestCasesOutput":
1569
+ """<p> Returns a list of details about test cases for a report. </p>
1570
+
1571
+ Args:
1572
+ report_arn: <p> The ARN of the report for which test cases are returned. </p>
1573
+ next_token: <p> During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. </p>
1574
+ max_results: <p> The maximum number of paginated test cases returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>TestCase</code> objects. The default value is 100. </p>
1575
+ filter: <p> A <code>TestCaseFilter</code> object used to filter the returned reports. </p>
1576
+
1577
+ Raises:
1578
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1579
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
1580
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1581
+ """
1582
+
1583
+ def _handler(
1584
+ req: "OperationRequest[capo_codebuild.types.describe_test_cases_input.DescribeTestCasesInput]",
1585
+ ) -> OperationResponse[
1586
+ "capo_codebuild.types.describe_test_cases_output.DescribeTestCasesOutput"
1587
+ ]:
1588
+ import capo_codebuild._operations.code_build_20161006.describe_test_cases
1589
+
1590
+ output, http_response = (
1591
+ capo_codebuild._operations.code_build_20161006.describe_test_cases.describe_test_cases(
1592
+ req.options, req.input
1593
+ )
1594
+ )
1595
+ return OperationResponse(output=output, response=http_response)
1596
+
1597
+ interceptors_, options_ = self.operation_options(config_overrides)
1598
+ input_: capo_codebuild.types.describe_test_cases_input.DescribeTestCasesInput = {
1599
+ "report_arn": report_arn
1600
+ }
1601
+ if next_token is not None:
1602
+ input_["next_token"] = next_token
1603
+ if max_results is not None:
1604
+ input_["max_results"] = max_results
1605
+ if filter is not None:
1606
+ input_["filter"] = filter
1607
+
1608
+ response = execute_pipeline(
1609
+ OperationRequest(input=input_, options=options_),
1610
+ handler=_handler,
1611
+ interceptors=list(interceptors_),
1612
+ )
1613
+ response.response.close()
1614
+ return response.output
1615
+
1616
+ def iter_describe_test_cases(
1617
+ self,
1618
+ report_arn: "capo_codebuild.types.string.String",
1619
+ *,
1620
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1621
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
1622
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
1623
+ filter: Optional["capo_codebuild.types.test_case_filter.TestCaseFilter"] = None,
1624
+ ) -> "Iterator[capo_codebuild.types.test_case.TestCase]":
1625
+ _token = next_token
1626
+ while True:
1627
+ _response = self.describe_test_cases(
1628
+ report_arn,
1629
+ config_overrides=config_overrides,
1630
+ next_token=_token,
1631
+ max_results=max_results,
1632
+ filter=filter,
1633
+ )
1634
+ _page = _resolve_path(_response, ("test_cases",))
1635
+ for _item in _page or []:
1636
+ yield _item
1637
+ _token = _resolve_path(_response, ("next_token",))
1638
+ if not _token:
1639
+ break
1640
+
1641
+ def get_report_group_trend(
1642
+ self,
1643
+ report_group_arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
1644
+ trend_field: "capo_codebuild.types.report_group_trend_field_type.ReportGroupTrendFieldType",
1645
+ *,
1646
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1647
+ num_of_reports: Optional["capo_codebuild.types.page_size.PageSize"] = None,
1648
+ ) -> "capo_codebuild.types.get_report_group_trend_output.GetReportGroupTrendOutput":
1649
+ """<p>Analyzes and accumulates test report values for the specified test reports.</p>
1650
+
1651
+ Args:
1652
+ report_group_arn: <p>The ARN of the report group that contains the reports to analyze.</p>
1653
+ num_of_reports: <p>The number of reports to analyze. This operation always retrieves the most recent reports.</p> <p>If this parameter is omitted, the most recent 100 reports are analyzed.</p>
1654
+ trend_field: <p>The test report value to accumulate. This must be one of the following values:</p> <dl> <dt>Test reports:</dt> <dd> <dl> <dt>DURATION</dt> <dd> <p>Accumulate the test run times for the specified reports.</p> </dd> <dt>PASS_RATE</dt> <dd> <p>Accumulate the percentage of tests that passed for the specified test reports.</p> </dd> <dt>TOTAL</dt> <dd> <p>Accumulate the total number of tests for the specified test reports.</p> </dd> </dl> </dd> </dl> <dl> <dt>Code coverage reports:</dt> <dd> <dl> <dt>BRANCH_COVERAGE</dt> <dd> <p>Accumulate the branch coverage percentages for the specified test reports.</p> </dd> <dt>BRANCHES_COVERED</dt> <dd> <p>Accumulate the branches covered values for the specified test reports.</p> </dd> <dt>BRANCHES_MISSED</dt> <dd> <p>Accumulate the branches missed values for the specified test reports.</p> </dd> <dt>LINE_COVERAGE</dt> <dd> <p>Accumulate the line coverage percentages for the specified test reports.</p> </dd> <dt>LINES_COVERED</dt> <dd> <p>Accumulate the lines covered values for the specified test reports.</p> </dd> <dt>LINES_MISSED</dt> <dd> <p>Accumulate the lines not covered values for the specified test reports.</p> </dd> </dl> </dd> </dl>
1655
+
1656
+ Raises:
1657
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1658
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
1659
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1660
+ """
1661
+
1662
+ def _handler(
1663
+ req: "OperationRequest[capo_codebuild.types.get_report_group_trend_input.GetReportGroupTrendInput]",
1664
+ ) -> OperationResponse[
1665
+ "capo_codebuild.types.get_report_group_trend_output.GetReportGroupTrendOutput"
1666
+ ]:
1667
+ import capo_codebuild._operations.code_build_20161006.get_report_group_trend
1668
+
1669
+ output, http_response = (
1670
+ capo_codebuild._operations.code_build_20161006.get_report_group_trend.get_report_group_trend(
1671
+ req.options, req.input
1672
+ )
1673
+ )
1674
+ return OperationResponse(output=output, response=http_response)
1675
+
1676
+ interceptors_, options_ = self.operation_options(config_overrides)
1677
+ input_: capo_codebuild.types.get_report_group_trend_input.GetReportGroupTrendInput = {
1678
+ "report_group_arn": report_group_arn,
1679
+ "trend_field": trend_field,
1680
+ }
1681
+ if num_of_reports is not None:
1682
+ input_["num_of_reports"] = num_of_reports
1683
+
1684
+ response = execute_pipeline(
1685
+ OperationRequest(input=input_, options=options_),
1686
+ handler=_handler,
1687
+ interceptors=list(interceptors_),
1688
+ )
1689
+ response.response.close()
1690
+ return response.output
1691
+
1692
+ def get_resource_policy(
1693
+ self,
1694
+ resource_arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
1695
+ *,
1696
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1697
+ ) -> "capo_codebuild.types.get_resource_policy_output.GetResourcePolicyOutput":
1698
+ """<p> Gets a resource policy that is identified by its resource ARN. </p>
1699
+
1700
+ Args:
1701
+ resource_arn: <p> The ARN of the resource that is associated with the resource policy. </p>
1702
+
1703
+ Raises:
1704
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1705
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
1706
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1707
+ """
1708
+
1709
+ def _handler(
1710
+ req: "OperationRequest[capo_codebuild.types.get_resource_policy_input.GetResourcePolicyInput]",
1711
+ ) -> OperationResponse[
1712
+ "capo_codebuild.types.get_resource_policy_output.GetResourcePolicyOutput"
1713
+ ]:
1714
+ import capo_codebuild._operations.code_build_20161006.get_resource_policy
1715
+
1716
+ output, http_response = (
1717
+ capo_codebuild._operations.code_build_20161006.get_resource_policy.get_resource_policy(
1718
+ req.options, req.input
1719
+ )
1720
+ )
1721
+ return OperationResponse(output=output, response=http_response)
1722
+
1723
+ interceptors_, options_ = self.operation_options(config_overrides)
1724
+ input_: capo_codebuild.types.get_resource_policy_input.GetResourcePolicyInput = {
1725
+ "resource_arn": resource_arn
1726
+ }
1727
+
1728
+ response = execute_pipeline(
1729
+ OperationRequest(input=input_, options=options_),
1730
+ handler=_handler,
1731
+ interceptors=list(interceptors_),
1732
+ )
1733
+ response.response.close()
1734
+ return response.output
1735
+
1736
+ def import_source_credentials(
1737
+ self,
1738
+ token: "capo_codebuild.types.sensitive_non_empty_string.SensitiveNonEmptyString",
1739
+ server_type: "capo_codebuild.types.server_type.ServerType",
1740
+ auth_type: "capo_codebuild.types.auth_type.AuthType",
1741
+ *,
1742
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1743
+ username: Optional[
1744
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
1745
+ ] = None,
1746
+ should_overwrite: Optional[
1747
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
1748
+ ] = None,
1749
+ ) -> "capo_codebuild.types.import_source_credentials_output.ImportSourceCredentialsOutput":
1750
+ """<p> Imports the source repository credentials for an CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. </p>
1751
+
1752
+ Args:
1753
+ username: <p> The Bitbucket username when the <code>authType</code> is BASIC_AUTH. This parameter is not valid for other types of source providers or connections. </p>
1754
+ token: <p> For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is either the access token or the app password. For the <code>authType</code> CODECONNECTIONS, this is the <code>connectionArn</code>. For the <code>authType</code> SECRETS_MANAGER, this is the <code>secretArn</code>.</p>
1755
+ server_type: <p> The source provider used for this project. </p>
1756
+ auth_type: <p> The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the CodeBuild console.</p>
1757
+ should_overwrite: <p> Set to <code>false</code> to prevent overwriting the repository source credentials. Set to <code>true</code> to overwrite the repository source credentials. The default value is <code>true</code>. </p>
1758
+
1759
+ Raises:
1760
+ capo_codebuild.errors.account_limit_exceeded_exception.AccountLimitExceededException: <p>An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.</p>
1761
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1762
+ capo_codebuild.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.</p>
1763
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1764
+ """
1765
+
1766
+ def _handler(
1767
+ req: "OperationRequest[capo_codebuild.types.import_source_credentials_input.ImportSourceCredentialsInput]",
1768
+ ) -> OperationResponse[
1769
+ "capo_codebuild.types.import_source_credentials_output.ImportSourceCredentialsOutput"
1770
+ ]:
1771
+ import capo_codebuild._operations.code_build_20161006.import_source_credentials
1772
+
1773
+ output, http_response = (
1774
+ capo_codebuild._operations.code_build_20161006.import_source_credentials.import_source_credentials(
1775
+ req.options, req.input
1776
+ )
1777
+ )
1778
+ return OperationResponse(output=output, response=http_response)
1779
+
1780
+ interceptors_, options_ = self.operation_options(config_overrides)
1781
+ input_: capo_codebuild.types.import_source_credentials_input.ImportSourceCredentialsInput = {
1782
+ "token": token,
1783
+ "server_type": server_type,
1784
+ "auth_type": auth_type,
1785
+ }
1786
+ if username is not None:
1787
+ input_["username"] = username
1788
+ if should_overwrite is not None:
1789
+ input_["should_overwrite"] = should_overwrite
1790
+
1791
+ response = execute_pipeline(
1792
+ OperationRequest(input=input_, options=options_),
1793
+ handler=_handler,
1794
+ interceptors=list(interceptors_),
1795
+ )
1796
+ response.response.close()
1797
+ return response.output
1798
+
1799
+ def invalidate_project_cache(
1800
+ self,
1801
+ project_name: "capo_codebuild.types.non_empty_string.NonEmptyString",
1802
+ *,
1803
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1804
+ ) -> "capo_codebuild.types.invalidate_project_cache_output.InvalidateProjectCacheOutput":
1805
+ """<p>Resets the cache for a project.</p>
1806
+
1807
+ Args:
1808
+ project_name: <p>The name of the CodeBuild build project that the cache is reset for.</p>
1809
+
1810
+ Raises:
1811
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1812
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
1813
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1814
+ """
1815
+
1816
+ def _handler(
1817
+ req: "OperationRequest[capo_codebuild.types.invalidate_project_cache_input.InvalidateProjectCacheInput]",
1818
+ ) -> OperationResponse[
1819
+ "capo_codebuild.types.invalidate_project_cache_output.InvalidateProjectCacheOutput"
1820
+ ]:
1821
+ import capo_codebuild._operations.code_build_20161006.invalidate_project_cache
1822
+
1823
+ output, http_response = (
1824
+ capo_codebuild._operations.code_build_20161006.invalidate_project_cache.invalidate_project_cache(
1825
+ req.options, req.input
1826
+ )
1827
+ )
1828
+ return OperationResponse(output=output, response=http_response)
1829
+
1830
+ interceptors_, options_ = self.operation_options(config_overrides)
1831
+ input_: capo_codebuild.types.invalidate_project_cache_input.InvalidateProjectCacheInput = {
1832
+ "project_name": project_name
1833
+ }
1834
+
1835
+ response = execute_pipeline(
1836
+ OperationRequest(input=input_, options=options_),
1837
+ handler=_handler,
1838
+ interceptors=list(interceptors_),
1839
+ )
1840
+ response.response.close()
1841
+ return response.output
1842
+
1843
+ def list_build_batches(
1844
+ self,
1845
+ *,
1846
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1847
+ filter: Optional[
1848
+ "capo_codebuild.types.build_batch_filter.BuildBatchFilter"
1849
+ ] = None,
1850
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
1851
+ sort_order: Optional[
1852
+ "capo_codebuild.types.sort_order_type.SortOrderType"
1853
+ ] = None,
1854
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
1855
+ ) -> "capo_codebuild.types.list_build_batches_output.ListBuildBatchesOutput":
1856
+ """<p>Retrieves the identifiers of your build batches in the current region.</p>
1857
+
1858
+ Args:
1859
+ filter: <p>A <code>BuildBatchFilter</code> object that specifies the filters for the search.</p>
1860
+ max_results: <p>The maximum number of results to return.</p>
1861
+ sort_order: <p>Specifies the sort order of the returned items. Valid values include:</p> <ul> <li> <p> <code>ASCENDING</code>: List the batch build identifiers in ascending order by identifier.</p> </li> <li> <p> <code>DESCENDING</code>: List the batch build identifiers in descending order by identifier.</p> </li> </ul>
1862
+ next_token: <p>The <code>nextToken</code> value returned from a previous call to <code>ListBuildBatches</code>. This specifies the next item to return. To return the beginning of the list, exclude this parameter.</p>
1863
+
1864
+ Raises:
1865
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1866
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1867
+ """
1868
+
1869
+ def _handler(
1870
+ req: "OperationRequest[capo_codebuild.types.list_build_batches_input.ListBuildBatchesInput]",
1871
+ ) -> OperationResponse[
1872
+ "capo_codebuild.types.list_build_batches_output.ListBuildBatchesOutput"
1873
+ ]:
1874
+ import capo_codebuild._operations.code_build_20161006.list_build_batches
1875
+
1876
+ output, http_response = (
1877
+ capo_codebuild._operations.code_build_20161006.list_build_batches.list_build_batches(
1878
+ req.options, req.input
1879
+ )
1880
+ )
1881
+ return OperationResponse(output=output, response=http_response)
1882
+
1883
+ interceptors_, options_ = self.operation_options(config_overrides)
1884
+ input_: capo_codebuild.types.list_build_batches_input.ListBuildBatchesInput = {}
1885
+ if filter is not None:
1886
+ input_["filter"] = filter
1887
+ if max_results is not None:
1888
+ input_["max_results"] = max_results
1889
+ if sort_order is not None:
1890
+ input_["sort_order"] = sort_order
1891
+ if next_token is not None:
1892
+ input_["next_token"] = next_token
1893
+
1894
+ response = execute_pipeline(
1895
+ OperationRequest(input=input_, options=options_),
1896
+ handler=_handler,
1897
+ interceptors=list(interceptors_),
1898
+ )
1899
+ response.response.close()
1900
+ return response.output
1901
+
1902
+ def iter_list_build_batches(
1903
+ self,
1904
+ *,
1905
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1906
+ filter: Optional[
1907
+ "capo_codebuild.types.build_batch_filter.BuildBatchFilter"
1908
+ ] = None,
1909
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
1910
+ sort_order: Optional[
1911
+ "capo_codebuild.types.sort_order_type.SortOrderType"
1912
+ ] = None,
1913
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
1914
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
1915
+ _token = next_token
1916
+ while True:
1917
+ _response = self.list_build_batches(
1918
+ config_overrides=config_overrides,
1919
+ filter=filter,
1920
+ max_results=max_results,
1921
+ sort_order=sort_order,
1922
+ next_token=_token,
1923
+ )
1924
+ _page = _resolve_path(_response, ("ids",))
1925
+ for _item in _page or []:
1926
+ yield _item
1927
+ _token = _resolve_path(_response, ("next_token",))
1928
+ if not _token:
1929
+ break
1930
+
1931
+ def list_build_batches_for_project(
1932
+ self,
1933
+ *,
1934
+ config_overrides: Optional[CodeBuildClientConfig] = None,
1935
+ project_name: Optional[
1936
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
1937
+ ] = None,
1938
+ filter: Optional[
1939
+ "capo_codebuild.types.build_batch_filter.BuildBatchFilter"
1940
+ ] = None,
1941
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
1942
+ sort_order: Optional[
1943
+ "capo_codebuild.types.sort_order_type.SortOrderType"
1944
+ ] = None,
1945
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
1946
+ ) -> "capo_codebuild.types.list_build_batches_for_project_output.ListBuildBatchesForProjectOutput":
1947
+ """<p>Retrieves the identifiers of the build batches for a specific project.</p>
1948
+
1949
+ Args:
1950
+ project_name: <p>The name of the project.</p>
1951
+ filter: <p>A <code>BuildBatchFilter</code> object that specifies the filters for the search.</p>
1952
+ max_results: <p>The maximum number of results to return.</p>
1953
+ sort_order: <p>Specifies the sort order of the returned items. Valid values include:</p> <ul> <li> <p> <code>ASCENDING</code>: List the batch build identifiers in ascending order by identifier.</p> </li> <li> <p> <code>DESCENDING</code>: List the batch build identifiers in descending order by identifier.</p> </li> </ul>
1954
+ next_token: <p>The <code>nextToken</code> value returned from a previous call to <code>ListBuildBatchesForProject</code>. This specifies the next item to return. To return the beginning of the list, exclude this parameter.</p>
1955
+
1956
+ Raises:
1957
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
1958
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
1959
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
1960
+ """
1961
+
1962
+ def _handler(
1963
+ req: "OperationRequest[capo_codebuild.types.list_build_batches_for_project_input.ListBuildBatchesForProjectInput]",
1964
+ ) -> OperationResponse[
1965
+ "capo_codebuild.types.list_build_batches_for_project_output.ListBuildBatchesForProjectOutput"
1966
+ ]:
1967
+ import capo_codebuild._operations.code_build_20161006.list_build_batches_for_project
1968
+
1969
+ output, http_response = (
1970
+ capo_codebuild._operations.code_build_20161006.list_build_batches_for_project.list_build_batches_for_project(
1971
+ req.options, req.input
1972
+ )
1973
+ )
1974
+ return OperationResponse(output=output, response=http_response)
1975
+
1976
+ interceptors_, options_ = self.operation_options(config_overrides)
1977
+ input_: capo_codebuild.types.list_build_batches_for_project_input.ListBuildBatchesForProjectInput = {}
1978
+ if project_name is not None:
1979
+ input_["project_name"] = project_name
1980
+ if filter is not None:
1981
+ input_["filter"] = filter
1982
+ if max_results is not None:
1983
+ input_["max_results"] = max_results
1984
+ if sort_order is not None:
1985
+ input_["sort_order"] = sort_order
1986
+ if next_token is not None:
1987
+ input_["next_token"] = next_token
1988
+
1989
+ response = execute_pipeline(
1990
+ OperationRequest(input=input_, options=options_),
1991
+ handler=_handler,
1992
+ interceptors=list(interceptors_),
1993
+ )
1994
+ response.response.close()
1995
+ return response.output
1996
+
1997
+ def iter_list_build_batches_for_project(
1998
+ self,
1999
+ *,
2000
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2001
+ project_name: Optional[
2002
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
2003
+ ] = None,
2004
+ filter: Optional[
2005
+ "capo_codebuild.types.build_batch_filter.BuildBatchFilter"
2006
+ ] = None,
2007
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2008
+ sort_order: Optional[
2009
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2010
+ ] = None,
2011
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2012
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
2013
+ _token = next_token
2014
+ while True:
2015
+ _response = self.list_build_batches_for_project(
2016
+ config_overrides=config_overrides,
2017
+ project_name=project_name,
2018
+ filter=filter,
2019
+ max_results=max_results,
2020
+ sort_order=sort_order,
2021
+ next_token=_token,
2022
+ )
2023
+ _page = _resolve_path(_response, ("ids",))
2024
+ for _item in _page or []:
2025
+ yield _item
2026
+ _token = _resolve_path(_response, ("next_token",))
2027
+ if not _token:
2028
+ break
2029
+
2030
+ def list_builds(
2031
+ self,
2032
+ *,
2033
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2034
+ sort_order: Optional[
2035
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2036
+ ] = None,
2037
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2038
+ ) -> "capo_codebuild.types.list_builds_output.ListBuildsOutput":
2039
+ """<p>Gets a list of build IDs, with each build ID representing a single build.</p>
2040
+
2041
+ Args:
2042
+ sort_order: <p>The order to list build IDs. Valid values include:</p> <ul> <li> <p> <code>ASCENDING</code>: List the build IDs in ascending order by build ID.</p> </li> <li> <p> <code>DESCENDING</code>: List the build IDs in descending order by build ID.</p> </li> </ul>
2043
+ next_token: <p>During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a <i>nextToken</i>. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.</p>
2044
+
2045
+ Raises:
2046
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2047
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2048
+ """
2049
+
2050
+ def _handler(
2051
+ req: "OperationRequest[capo_codebuild.types.list_builds_input.ListBuildsInput]",
2052
+ ) -> OperationResponse[
2053
+ "capo_codebuild.types.list_builds_output.ListBuildsOutput"
2054
+ ]:
2055
+ import capo_codebuild._operations.code_build_20161006.list_builds
2056
+
2057
+ output, http_response = (
2058
+ capo_codebuild._operations.code_build_20161006.list_builds.list_builds(
2059
+ req.options, req.input
2060
+ )
2061
+ )
2062
+ return OperationResponse(output=output, response=http_response)
2063
+
2064
+ interceptors_, options_ = self.operation_options(config_overrides)
2065
+ input_: capo_codebuild.types.list_builds_input.ListBuildsInput = {}
2066
+ if sort_order is not None:
2067
+ input_["sort_order"] = sort_order
2068
+ if next_token is not None:
2069
+ input_["next_token"] = next_token
2070
+
2071
+ response = execute_pipeline(
2072
+ OperationRequest(input=input_, options=options_),
2073
+ handler=_handler,
2074
+ interceptors=list(interceptors_),
2075
+ )
2076
+ response.response.close()
2077
+ return response.output
2078
+
2079
+ def iter_list_builds(
2080
+ self,
2081
+ *,
2082
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2083
+ sort_order: Optional[
2084
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2085
+ ] = None,
2086
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2087
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
2088
+ _token = next_token
2089
+ while True:
2090
+ _response = self.list_builds(
2091
+ config_overrides=config_overrides,
2092
+ sort_order=sort_order,
2093
+ next_token=_token,
2094
+ )
2095
+ _page = _resolve_path(_response, ("ids",))
2096
+ for _item in _page or []:
2097
+ yield _item
2098
+ _token = _resolve_path(_response, ("next_token",))
2099
+ if not _token:
2100
+ break
2101
+
2102
+ def list_builds_for_project(
2103
+ self,
2104
+ project_name: "capo_codebuild.types.non_empty_string.NonEmptyString",
2105
+ *,
2106
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2107
+ sort_order: Optional[
2108
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2109
+ ] = None,
2110
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2111
+ ) -> (
2112
+ "capo_codebuild.types.list_builds_for_project_output.ListBuildsForProjectOutput"
2113
+ ):
2114
+ """<p>Gets a list of build identifiers for the specified build project, with each build identifier representing a single build.</p>
2115
+
2116
+ Args:
2117
+ project_name: <p>The name of the CodeBuild project.</p>
2118
+ sort_order: <p>The order to sort the results in. The results are sorted by build number, not the build identifier. If this is not specified, the results are sorted in descending order.</p> <p>Valid values include:</p> <ul> <li> <p> <code>ASCENDING</code>: List the build identifiers in ascending order, by build number.</p> </li> <li> <p> <code>DESCENDING</code>: List the build identifiers in descending order, by build number.</p> </li> </ul> <p>If the project has more than 100 builds, setting the sort order will result in an error. </p>
2119
+ next_token: <p>During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a <i>nextToken</i>. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.</p>
2120
+
2121
+ Raises:
2122
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2123
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
2124
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2125
+ """
2126
+
2127
+ def _handler(
2128
+ req: "OperationRequest[capo_codebuild.types.list_builds_for_project_input.ListBuildsForProjectInput]",
2129
+ ) -> OperationResponse[
2130
+ "capo_codebuild.types.list_builds_for_project_output.ListBuildsForProjectOutput"
2131
+ ]:
2132
+ import capo_codebuild._operations.code_build_20161006.list_builds_for_project
2133
+
2134
+ output, http_response = (
2135
+ capo_codebuild._operations.code_build_20161006.list_builds_for_project.list_builds_for_project(
2136
+ req.options, req.input
2137
+ )
2138
+ )
2139
+ return OperationResponse(output=output, response=http_response)
2140
+
2141
+ interceptors_, options_ = self.operation_options(config_overrides)
2142
+ input_: capo_codebuild.types.list_builds_for_project_input.ListBuildsForProjectInput = {
2143
+ "project_name": project_name
2144
+ }
2145
+ if sort_order is not None:
2146
+ input_["sort_order"] = sort_order
2147
+ if next_token is not None:
2148
+ input_["next_token"] = next_token
2149
+
2150
+ response = execute_pipeline(
2151
+ OperationRequest(input=input_, options=options_),
2152
+ handler=_handler,
2153
+ interceptors=list(interceptors_),
2154
+ )
2155
+ response.response.close()
2156
+ return response.output
2157
+
2158
+ def iter_list_builds_for_project(
2159
+ self,
2160
+ project_name: "capo_codebuild.types.non_empty_string.NonEmptyString",
2161
+ *,
2162
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2163
+ sort_order: Optional[
2164
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2165
+ ] = None,
2166
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2167
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
2168
+ _token = next_token
2169
+ while True:
2170
+ _response = self.list_builds_for_project(
2171
+ project_name,
2172
+ config_overrides=config_overrides,
2173
+ sort_order=sort_order,
2174
+ next_token=_token,
2175
+ )
2176
+ _page = _resolve_path(_response, ("ids",))
2177
+ for _item in _page or []:
2178
+ yield _item
2179
+ _token = _resolve_path(_response, ("next_token",))
2180
+ if not _token:
2181
+ break
2182
+
2183
+ def list_command_executions_for_sandbox(
2184
+ self,
2185
+ sandbox_id: "capo_codebuild.types.non_empty_string.NonEmptyString",
2186
+ *,
2187
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2188
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2189
+ sort_order: Optional[
2190
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2191
+ ] = None,
2192
+ next_token: Optional[
2193
+ "capo_codebuild.types.sensitive_string.SensitiveString"
2194
+ ] = None,
2195
+ ) -> "capo_codebuild.types.list_command_executions_for_sandbox_output.ListCommandExecutionsForSandboxOutput":
2196
+ """<p>Gets a list of command executions for a sandbox.</p>
2197
+
2198
+ Args:
2199
+ sandbox_id: <p>A <code>sandboxId</code> or <code>sandboxArn</code>.</p>
2200
+ max_results: <p>The maximum number of sandbox records to be retrieved.</p>
2201
+ sort_order: <p>The order in which sandbox records should be retrieved.</p>
2202
+ next_token: <p>The next token, if any, to get paginated results. You will get this value from previous execution of list sandboxes.</p>
2203
+
2204
+ Raises:
2205
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2206
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
2207
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2208
+ """
2209
+
2210
+ def _handler(
2211
+ req: "OperationRequest[capo_codebuild.types.list_command_executions_for_sandbox_input.ListCommandExecutionsForSandboxInput]",
2212
+ ) -> OperationResponse[
2213
+ "capo_codebuild.types.list_command_executions_for_sandbox_output.ListCommandExecutionsForSandboxOutput"
2214
+ ]:
2215
+ import capo_codebuild._operations.code_build_20161006.list_command_executions_for_sandbox
2216
+
2217
+ output, http_response = (
2218
+ capo_codebuild._operations.code_build_20161006.list_command_executions_for_sandbox.list_command_executions_for_sandbox(
2219
+ req.options, req.input
2220
+ )
2221
+ )
2222
+ return OperationResponse(output=output, response=http_response)
2223
+
2224
+ interceptors_, options_ = self.operation_options(config_overrides)
2225
+ input_: capo_codebuild.types.list_command_executions_for_sandbox_input.ListCommandExecutionsForSandboxInput = {
2226
+ "sandbox_id": sandbox_id
2227
+ }
2228
+ if max_results is not None:
2229
+ input_["max_results"] = max_results
2230
+ if sort_order is not None:
2231
+ input_["sort_order"] = sort_order
2232
+ if next_token is not None:
2233
+ input_["next_token"] = next_token
2234
+
2235
+ response = execute_pipeline(
2236
+ OperationRequest(input=input_, options=options_),
2237
+ handler=_handler,
2238
+ interceptors=list(interceptors_),
2239
+ )
2240
+ response.response.close()
2241
+ return response.output
2242
+
2243
+ def iter_list_command_executions_for_sandbox(
2244
+ self,
2245
+ sandbox_id: "capo_codebuild.types.non_empty_string.NonEmptyString",
2246
+ *,
2247
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2248
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2249
+ sort_order: Optional[
2250
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2251
+ ] = None,
2252
+ next_token: Optional[
2253
+ "capo_codebuild.types.sensitive_string.SensitiveString"
2254
+ ] = None,
2255
+ ) -> "Iterator[capo_codebuild.types.command_execution.CommandExecution]":
2256
+ _token = next_token
2257
+ while True:
2258
+ _response = self.list_command_executions_for_sandbox(
2259
+ sandbox_id,
2260
+ config_overrides=config_overrides,
2261
+ max_results=max_results,
2262
+ sort_order=sort_order,
2263
+ next_token=_token,
2264
+ )
2265
+ _page = _resolve_path(_response, ("command_executions",))
2266
+ for _item in _page or []:
2267
+ yield _item
2268
+ _token = _resolve_path(_response, ("next_token",))
2269
+ if not _token:
2270
+ break
2271
+
2272
+ def list_curated_environment_images(
2273
+ self, *, config_overrides: Optional[CodeBuildClientConfig] = None
2274
+ ) -> "capo_codebuild.types.list_curated_environment_images_output.ListCuratedEnvironmentImagesOutput":
2275
+ """<p>Gets information about Docker images that are managed by CodeBuild.</p>
2276
+
2277
+ Raises:
2278
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2279
+ """
2280
+
2281
+ def _handler(
2282
+ req: "OperationRequest[capo_codebuild.types.list_curated_environment_images_input.ListCuratedEnvironmentImagesInput]",
2283
+ ) -> OperationResponse[
2284
+ "capo_codebuild.types.list_curated_environment_images_output.ListCuratedEnvironmentImagesOutput"
2285
+ ]:
2286
+ import capo_codebuild._operations.code_build_20161006.list_curated_environment_images
2287
+
2288
+ output, http_response = (
2289
+ capo_codebuild._operations.code_build_20161006.list_curated_environment_images.list_curated_environment_images(
2290
+ req.options, req.input
2291
+ )
2292
+ )
2293
+ return OperationResponse(output=output, response=http_response)
2294
+
2295
+ interceptors_, options_ = self.operation_options(config_overrides)
2296
+ input_: capo_codebuild.types.list_curated_environment_images_input.ListCuratedEnvironmentImagesInput = {}
2297
+
2298
+ response = execute_pipeline(
2299
+ OperationRequest(input=input_, options=options_),
2300
+ handler=_handler,
2301
+ interceptors=list(interceptors_),
2302
+ )
2303
+ response.response.close()
2304
+ return response.output
2305
+
2306
+ def list_fleets(
2307
+ self,
2308
+ *,
2309
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2310
+ next_token: Optional[
2311
+ "capo_codebuild.types.sensitive_string.SensitiveString"
2312
+ ] = None,
2313
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2314
+ sort_order: Optional[
2315
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2316
+ ] = None,
2317
+ sort_by: Optional[
2318
+ "capo_codebuild.types.fleet_sort_by_type.FleetSortByType"
2319
+ ] = None,
2320
+ ) -> "capo_codebuild.types.list_fleets_output.ListFleetsOutput":
2321
+ """<p>Gets a list of compute fleet names with each compute fleet name representing a single compute fleet.</p>
2322
+
2323
+ Args:
2324
+ next_token: <p>During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a <i>nextToken</i>. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.</p>
2325
+ max_results: <p>The maximum number of paginated compute fleets returned per response. Use <code>nextToken</code> to iterate pages in the list of returned compute fleets.</p>
2326
+ sort_order: <p>The order in which to list compute fleets. Valid values include:</p> <ul> <li> <p> <code>ASCENDING</code>: List in ascending order.</p> </li> <li> <p> <code>DESCENDING</code>: List in descending order.</p> </li> </ul> <p>Use <code>sortBy</code> to specify the criterion to be used to list compute fleet names.</p>
2327
+ sort_by: <p>The criterion to be used to list compute fleet names. Valid values include:</p> <ul> <li> <p> <code>CREATED_TIME</code>: List based on when each compute fleet was created.</p> </li> <li> <p> <code>LAST_MODIFIED_TIME</code>: List based on when information about each compute fleet was last changed.</p> </li> <li> <p> <code>NAME</code>: List based on each compute fleet's name.</p> </li> </ul> <p>Use <code>sortOrder</code> to specify in what order to list the compute fleet names based on the preceding criteria.</p>
2328
+
2329
+ Raises:
2330
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2331
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2332
+ """
2333
+
2334
+ def _handler(
2335
+ req: "OperationRequest[capo_codebuild.types.list_fleets_input.ListFleetsInput]",
2336
+ ) -> OperationResponse[
2337
+ "capo_codebuild.types.list_fleets_output.ListFleetsOutput"
2338
+ ]:
2339
+ import capo_codebuild._operations.code_build_20161006.list_fleets
2340
+
2341
+ output, http_response = (
2342
+ capo_codebuild._operations.code_build_20161006.list_fleets.list_fleets(
2343
+ req.options, req.input
2344
+ )
2345
+ )
2346
+ return OperationResponse(output=output, response=http_response)
2347
+
2348
+ interceptors_, options_ = self.operation_options(config_overrides)
2349
+ input_: capo_codebuild.types.list_fleets_input.ListFleetsInput = {}
2350
+ if next_token is not None:
2351
+ input_["next_token"] = next_token
2352
+ if max_results is not None:
2353
+ input_["max_results"] = max_results
2354
+ if sort_order is not None:
2355
+ input_["sort_order"] = sort_order
2356
+ if sort_by is not None:
2357
+ input_["sort_by"] = sort_by
2358
+
2359
+ response = execute_pipeline(
2360
+ OperationRequest(input=input_, options=options_),
2361
+ handler=_handler,
2362
+ interceptors=list(interceptors_),
2363
+ )
2364
+ response.response.close()
2365
+ return response.output
2366
+
2367
+ def iter_list_fleets(
2368
+ self,
2369
+ *,
2370
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2371
+ next_token: Optional[
2372
+ "capo_codebuild.types.sensitive_string.SensitiveString"
2373
+ ] = None,
2374
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2375
+ sort_order: Optional[
2376
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2377
+ ] = None,
2378
+ sort_by: Optional[
2379
+ "capo_codebuild.types.fleet_sort_by_type.FleetSortByType"
2380
+ ] = None,
2381
+ ) -> "Iterator[capo_codebuild.types.list_fleets_output.ListFleetsOutput]":
2382
+ _token = next_token
2383
+ while True:
2384
+ _response = self.list_fleets(
2385
+ config_overrides=config_overrides,
2386
+ next_token=_token,
2387
+ max_results=max_results,
2388
+ sort_order=sort_order,
2389
+ sort_by=sort_by,
2390
+ )
2391
+ yield _response
2392
+ _token = _resolve_path(_response, ("next_token",))
2393
+ if not _token:
2394
+ break
2395
+
2396
+ def list_projects(
2397
+ self,
2398
+ *,
2399
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2400
+ sort_by: Optional[
2401
+ "capo_codebuild.types.project_sort_by_type.ProjectSortByType"
2402
+ ] = None,
2403
+ sort_order: Optional[
2404
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2405
+ ] = None,
2406
+ next_token: Optional[
2407
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
2408
+ ] = None,
2409
+ ) -> "capo_codebuild.types.list_projects_output.ListProjectsOutput":
2410
+ """<p>Gets a list of build project names, with each build project name representing a single build project.</p>
2411
+
2412
+ Args:
2413
+ sort_by: <p>The criterion to be used to list build project names. Valid values include:</p> <ul> <li> <p> <code>CREATED_TIME</code>: List based on when each build project was created.</p> </li> <li> <p> <code>LAST_MODIFIED_TIME</code>: List based on when information about each build project was last changed.</p> </li> <li> <p> <code>NAME</code>: List based on each build project's name.</p> </li> </ul> <p>Use <code>sortOrder</code> to specify in what order to list the build project names based on the preceding criteria.</p>
2414
+ sort_order: <p>The order in which to list build projects. Valid values include:</p> <ul> <li> <p> <code>ASCENDING</code>: List in ascending order.</p> </li> <li> <p> <code>DESCENDING</code>: List in descending order.</p> </li> </ul> <p>Use <code>sortBy</code> to specify the criterion to be used to list build project names.</p>
2415
+ next_token: <p>During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a <i>nextToken</i>. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.</p>
2416
+
2417
+ Raises:
2418
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2419
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2420
+ """
2421
+
2422
+ def _handler(
2423
+ req: "OperationRequest[capo_codebuild.types.list_projects_input.ListProjectsInput]",
2424
+ ) -> OperationResponse[
2425
+ "capo_codebuild.types.list_projects_output.ListProjectsOutput"
2426
+ ]:
2427
+ import capo_codebuild._operations.code_build_20161006.list_projects
2428
+
2429
+ output, http_response = (
2430
+ capo_codebuild._operations.code_build_20161006.list_projects.list_projects(
2431
+ req.options, req.input
2432
+ )
2433
+ )
2434
+ return OperationResponse(output=output, response=http_response)
2435
+
2436
+ interceptors_, options_ = self.operation_options(config_overrides)
2437
+ input_: capo_codebuild.types.list_projects_input.ListProjectsInput = {}
2438
+ if sort_by is not None:
2439
+ input_["sort_by"] = sort_by
2440
+ if sort_order is not None:
2441
+ input_["sort_order"] = sort_order
2442
+ if next_token is not None:
2443
+ input_["next_token"] = next_token
2444
+
2445
+ response = execute_pipeline(
2446
+ OperationRequest(input=input_, options=options_),
2447
+ handler=_handler,
2448
+ interceptors=list(interceptors_),
2449
+ )
2450
+ response.response.close()
2451
+ return response.output
2452
+
2453
+ def iter_list_projects(
2454
+ self,
2455
+ *,
2456
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2457
+ sort_by: Optional[
2458
+ "capo_codebuild.types.project_sort_by_type.ProjectSortByType"
2459
+ ] = None,
2460
+ sort_order: Optional[
2461
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2462
+ ] = None,
2463
+ next_token: Optional[
2464
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
2465
+ ] = None,
2466
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
2467
+ _token = next_token
2468
+ while True:
2469
+ _response = self.list_projects(
2470
+ config_overrides=config_overrides,
2471
+ sort_by=sort_by,
2472
+ sort_order=sort_order,
2473
+ next_token=_token,
2474
+ )
2475
+ _page = _resolve_path(_response, ("projects",))
2476
+ for _item in _page or []:
2477
+ yield _item
2478
+ _token = _resolve_path(_response, ("next_token",))
2479
+ if not _token:
2480
+ break
2481
+
2482
+ def list_report_groups(
2483
+ self,
2484
+ *,
2485
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2486
+ sort_order: Optional[
2487
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2488
+ ] = None,
2489
+ sort_by: Optional[
2490
+ "capo_codebuild.types.report_group_sort_by_type.ReportGroupSortByType"
2491
+ ] = None,
2492
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2493
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2494
+ ) -> "capo_codebuild.types.list_report_groups_output.ListReportGroupsOutput":
2495
+ """<p> Gets a list ARNs for the report groups in the current Amazon Web Services account. </p>
2496
+
2497
+ Args:
2498
+ sort_order: <p> Used to specify the order to sort the list of returned report groups. Valid values are <code>ASCENDING</code> and <code>DESCENDING</code>. </p>
2499
+ sort_by: <p> The criterion to be used to list build report groups. Valid values include: </p> <ul> <li> <p> <code>CREATED_TIME</code>: List based on when each report group was created.</p> </li> <li> <p> <code>LAST_MODIFIED_TIME</code>: List based on when each report group was last changed.</p> </li> <li> <p> <code>NAME</code>: List based on each report group's name.</p> </li> </ul>
2500
+ next_token: <p> During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. </p>
2501
+ max_results: <p> The maximum number of paginated report groups returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>ReportGroup</code> objects. The default value is 100. </p>
2502
+
2503
+ Raises:
2504
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2505
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2506
+ """
2507
+
2508
+ def _handler(
2509
+ req: "OperationRequest[capo_codebuild.types.list_report_groups_input.ListReportGroupsInput]",
2510
+ ) -> OperationResponse[
2511
+ "capo_codebuild.types.list_report_groups_output.ListReportGroupsOutput"
2512
+ ]:
2513
+ import capo_codebuild._operations.code_build_20161006.list_report_groups
2514
+
2515
+ output, http_response = (
2516
+ capo_codebuild._operations.code_build_20161006.list_report_groups.list_report_groups(
2517
+ req.options, req.input
2518
+ )
2519
+ )
2520
+ return OperationResponse(output=output, response=http_response)
2521
+
2522
+ interceptors_, options_ = self.operation_options(config_overrides)
2523
+ input_: capo_codebuild.types.list_report_groups_input.ListReportGroupsInput = {}
2524
+ if sort_order is not None:
2525
+ input_["sort_order"] = sort_order
2526
+ if sort_by is not None:
2527
+ input_["sort_by"] = sort_by
2528
+ if next_token is not None:
2529
+ input_["next_token"] = next_token
2530
+ if max_results is not None:
2531
+ input_["max_results"] = max_results
2532
+
2533
+ response = execute_pipeline(
2534
+ OperationRequest(input=input_, options=options_),
2535
+ handler=_handler,
2536
+ interceptors=list(interceptors_),
2537
+ )
2538
+ response.response.close()
2539
+ return response.output
2540
+
2541
+ def iter_list_report_groups(
2542
+ self,
2543
+ *,
2544
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2545
+ sort_order: Optional[
2546
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2547
+ ] = None,
2548
+ sort_by: Optional[
2549
+ "capo_codebuild.types.report_group_sort_by_type.ReportGroupSortByType"
2550
+ ] = None,
2551
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2552
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2553
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
2554
+ _token = next_token
2555
+ while True:
2556
+ _response = self.list_report_groups(
2557
+ config_overrides=config_overrides,
2558
+ sort_order=sort_order,
2559
+ sort_by=sort_by,
2560
+ next_token=_token,
2561
+ max_results=max_results,
2562
+ )
2563
+ _page = _resolve_path(_response, ("report_groups",))
2564
+ for _item in _page or []:
2565
+ yield _item
2566
+ _token = _resolve_path(_response, ("next_token",))
2567
+ if not _token:
2568
+ break
2569
+
2570
+ def list_reports(
2571
+ self,
2572
+ *,
2573
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2574
+ sort_order: Optional[
2575
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2576
+ ] = None,
2577
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2578
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2579
+ filter: Optional["capo_codebuild.types.report_filter.ReportFilter"] = None,
2580
+ ) -> "capo_codebuild.types.list_reports_output.ListReportsOutput":
2581
+ """<p> Returns a list of ARNs for the reports in the current Amazon Web Services account. </p>
2582
+
2583
+ Args:
2584
+ sort_order: <p> Specifies the sort order for the list of returned reports. Valid values are: </p> <ul> <li> <p> <code>ASCENDING</code>: return reports in chronological order based on their creation date. </p> </li> <li> <p> <code>DESCENDING</code>: return reports in the reverse chronological order based on their creation date. </p> </li> </ul>
2585
+ next_token: <p> During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. </p>
2586
+ max_results: <p> The maximum number of paginated reports returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>Report</code> objects. The default value is 100. </p>
2587
+ filter: <p> A <code>ReportFilter</code> object used to filter the returned reports. </p>
2588
+
2589
+ Raises:
2590
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2591
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2592
+ """
2593
+
2594
+ def _handler(
2595
+ req: "OperationRequest[capo_codebuild.types.list_reports_input.ListReportsInput]",
2596
+ ) -> OperationResponse[
2597
+ "capo_codebuild.types.list_reports_output.ListReportsOutput"
2598
+ ]:
2599
+ import capo_codebuild._operations.code_build_20161006.list_reports
2600
+
2601
+ output, http_response = (
2602
+ capo_codebuild._operations.code_build_20161006.list_reports.list_reports(
2603
+ req.options, req.input
2604
+ )
2605
+ )
2606
+ return OperationResponse(output=output, response=http_response)
2607
+
2608
+ interceptors_, options_ = self.operation_options(config_overrides)
2609
+ input_: capo_codebuild.types.list_reports_input.ListReportsInput = {}
2610
+ if sort_order is not None:
2611
+ input_["sort_order"] = sort_order
2612
+ if next_token is not None:
2613
+ input_["next_token"] = next_token
2614
+ if max_results is not None:
2615
+ input_["max_results"] = max_results
2616
+ if filter is not None:
2617
+ input_["filter"] = filter
2618
+
2619
+ response = execute_pipeline(
2620
+ OperationRequest(input=input_, options=options_),
2621
+ handler=_handler,
2622
+ interceptors=list(interceptors_),
2623
+ )
2624
+ response.response.close()
2625
+ return response.output
2626
+
2627
+ def iter_list_reports(
2628
+ self,
2629
+ *,
2630
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2631
+ sort_order: Optional[
2632
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2633
+ ] = None,
2634
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2635
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2636
+ filter: Optional["capo_codebuild.types.report_filter.ReportFilter"] = None,
2637
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
2638
+ _token = next_token
2639
+ while True:
2640
+ _response = self.list_reports(
2641
+ config_overrides=config_overrides,
2642
+ sort_order=sort_order,
2643
+ next_token=_token,
2644
+ max_results=max_results,
2645
+ filter=filter,
2646
+ )
2647
+ _page = _resolve_path(_response, ("reports",))
2648
+ for _item in _page or []:
2649
+ yield _item
2650
+ _token = _resolve_path(_response, ("next_token",))
2651
+ if not _token:
2652
+ break
2653
+
2654
+ def list_reports_for_report_group(
2655
+ self,
2656
+ report_group_arn: "capo_codebuild.types.string.String",
2657
+ *,
2658
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2659
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2660
+ sort_order: Optional[
2661
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2662
+ ] = None,
2663
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2664
+ filter: Optional["capo_codebuild.types.report_filter.ReportFilter"] = None,
2665
+ ) -> "capo_codebuild.types.list_reports_for_report_group_output.ListReportsForReportGroupOutput":
2666
+ """<p> Returns a list of ARNs for the reports that belong to a <code>ReportGroup</code>. </p>
2667
+
2668
+ Args:
2669
+ report_group_arn: <p> The ARN of the report group for which you want to return report ARNs. </p>
2670
+ next_token: <p> During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. </p>
2671
+ sort_order: <p> Use to specify whether the results are returned in ascending or descending order. </p>
2672
+ max_results: <p> The maximum number of paginated reports in this report group returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>Report</code> objects. The default value is 100. </p>
2673
+ filter: <p> A <code>ReportFilter</code> object used to filter the returned reports. </p>
2674
+
2675
+ Raises:
2676
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2677
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
2678
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2679
+ """
2680
+
2681
+ def _handler(
2682
+ req: "OperationRequest[capo_codebuild.types.list_reports_for_report_group_input.ListReportsForReportGroupInput]",
2683
+ ) -> OperationResponse[
2684
+ "capo_codebuild.types.list_reports_for_report_group_output.ListReportsForReportGroupOutput"
2685
+ ]:
2686
+ import capo_codebuild._operations.code_build_20161006.list_reports_for_report_group
2687
+
2688
+ output, http_response = (
2689
+ capo_codebuild._operations.code_build_20161006.list_reports_for_report_group.list_reports_for_report_group(
2690
+ req.options, req.input
2691
+ )
2692
+ )
2693
+ return OperationResponse(output=output, response=http_response)
2694
+
2695
+ interceptors_, options_ = self.operation_options(config_overrides)
2696
+ input_: capo_codebuild.types.list_reports_for_report_group_input.ListReportsForReportGroupInput = {
2697
+ "report_group_arn": report_group_arn
2698
+ }
2699
+ if next_token is not None:
2700
+ input_["next_token"] = next_token
2701
+ if sort_order is not None:
2702
+ input_["sort_order"] = sort_order
2703
+ if max_results is not None:
2704
+ input_["max_results"] = max_results
2705
+ if filter is not None:
2706
+ input_["filter"] = filter
2707
+
2708
+ response = execute_pipeline(
2709
+ OperationRequest(input=input_, options=options_),
2710
+ handler=_handler,
2711
+ interceptors=list(interceptors_),
2712
+ )
2713
+ response.response.close()
2714
+ return response.output
2715
+
2716
+ def iter_list_reports_for_report_group(
2717
+ self,
2718
+ report_group_arn: "capo_codebuild.types.string.String",
2719
+ *,
2720
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2721
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2722
+ sort_order: Optional[
2723
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2724
+ ] = None,
2725
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2726
+ filter: Optional["capo_codebuild.types.report_filter.ReportFilter"] = None,
2727
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
2728
+ _token = next_token
2729
+ while True:
2730
+ _response = self.list_reports_for_report_group(
2731
+ report_group_arn,
2732
+ config_overrides=config_overrides,
2733
+ next_token=_token,
2734
+ sort_order=sort_order,
2735
+ max_results=max_results,
2736
+ filter=filter,
2737
+ )
2738
+ _page = _resolve_path(_response, ("reports",))
2739
+ for _item in _page or []:
2740
+ yield _item
2741
+ _token = _resolve_path(_response, ("next_token",))
2742
+ if not _token:
2743
+ break
2744
+
2745
+ def list_sandboxes(
2746
+ self,
2747
+ *,
2748
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2749
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2750
+ sort_order: Optional[
2751
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2752
+ ] = None,
2753
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2754
+ ) -> "capo_codebuild.types.list_sandboxes_output.ListSandboxesOutput":
2755
+ """<p>Gets a list of sandboxes.</p>
2756
+
2757
+ Args:
2758
+ max_results: <p>The maximum number of sandbox records to be retrieved.</p>
2759
+ sort_order: <p>The order in which sandbox records should be retrieved.</p>
2760
+ next_token: <p>The next token, if any, to get paginated results. You will get this value from previous execution of list sandboxes.</p>
2761
+
2762
+ Raises:
2763
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2764
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2765
+ """
2766
+
2767
+ def _handler(
2768
+ req: "OperationRequest[capo_codebuild.types.list_sandboxes_input.ListSandboxesInput]",
2769
+ ) -> OperationResponse[
2770
+ "capo_codebuild.types.list_sandboxes_output.ListSandboxesOutput"
2771
+ ]:
2772
+ import capo_codebuild._operations.code_build_20161006.list_sandboxes
2773
+
2774
+ output, http_response = (
2775
+ capo_codebuild._operations.code_build_20161006.list_sandboxes.list_sandboxes(
2776
+ req.options, req.input
2777
+ )
2778
+ )
2779
+ return OperationResponse(output=output, response=http_response)
2780
+
2781
+ interceptors_, options_ = self.operation_options(config_overrides)
2782
+ input_: capo_codebuild.types.list_sandboxes_input.ListSandboxesInput = {}
2783
+ if max_results is not None:
2784
+ input_["max_results"] = max_results
2785
+ if sort_order is not None:
2786
+ input_["sort_order"] = sort_order
2787
+ if next_token is not None:
2788
+ input_["next_token"] = next_token
2789
+
2790
+ response = execute_pipeline(
2791
+ OperationRequest(input=input_, options=options_),
2792
+ handler=_handler,
2793
+ interceptors=list(interceptors_),
2794
+ )
2795
+ response.response.close()
2796
+ return response.output
2797
+
2798
+ def iter_list_sandboxes(
2799
+ self,
2800
+ *,
2801
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2802
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2803
+ sort_order: Optional[
2804
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2805
+ ] = None,
2806
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
2807
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
2808
+ _token = next_token
2809
+ while True:
2810
+ _response = self.list_sandboxes(
2811
+ config_overrides=config_overrides,
2812
+ max_results=max_results,
2813
+ sort_order=sort_order,
2814
+ next_token=_token,
2815
+ )
2816
+ _page = _resolve_path(_response, ("ids",))
2817
+ for _item in _page or []:
2818
+ yield _item
2819
+ _token = _resolve_path(_response, ("next_token",))
2820
+ if not _token:
2821
+ break
2822
+
2823
+ def list_sandboxes_for_project(
2824
+ self,
2825
+ project_name: "capo_codebuild.types.non_empty_string.NonEmptyString",
2826
+ *,
2827
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2828
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2829
+ sort_order: Optional[
2830
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2831
+ ] = None,
2832
+ next_token: Optional[
2833
+ "capo_codebuild.types.sensitive_string.SensitiveString"
2834
+ ] = None,
2835
+ ) -> "capo_codebuild.types.list_sandboxes_for_project_output.ListSandboxesForProjectOutput":
2836
+ """<p>Gets a list of sandboxes for a given project.</p>
2837
+
2838
+ Args:
2839
+ project_name: <p>The CodeBuild project name.</p>
2840
+ max_results: <p>The maximum number of sandbox records to be retrieved.</p>
2841
+ sort_order: <p>The order in which sandbox records should be retrieved.</p>
2842
+ next_token: <p>The next token, if any, to get paginated results. You will get this value from previous execution of list sandboxes.</p>
2843
+
2844
+ Raises:
2845
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2846
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
2847
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2848
+ """
2849
+
2850
+ def _handler(
2851
+ req: "OperationRequest[capo_codebuild.types.list_sandboxes_for_project_input.ListSandboxesForProjectInput]",
2852
+ ) -> OperationResponse[
2853
+ "capo_codebuild.types.list_sandboxes_for_project_output.ListSandboxesForProjectOutput"
2854
+ ]:
2855
+ import capo_codebuild._operations.code_build_20161006.list_sandboxes_for_project
2856
+
2857
+ output, http_response = (
2858
+ capo_codebuild._operations.code_build_20161006.list_sandboxes_for_project.list_sandboxes_for_project(
2859
+ req.options, req.input
2860
+ )
2861
+ )
2862
+ return OperationResponse(output=output, response=http_response)
2863
+
2864
+ interceptors_, options_ = self.operation_options(config_overrides)
2865
+ input_: capo_codebuild.types.list_sandboxes_for_project_input.ListSandboxesForProjectInput = {
2866
+ "project_name": project_name
2867
+ }
2868
+ if max_results is not None:
2869
+ input_["max_results"] = max_results
2870
+ if sort_order is not None:
2871
+ input_["sort_order"] = sort_order
2872
+ if next_token is not None:
2873
+ input_["next_token"] = next_token
2874
+
2875
+ response = execute_pipeline(
2876
+ OperationRequest(input=input_, options=options_),
2877
+ handler=_handler,
2878
+ interceptors=list(interceptors_),
2879
+ )
2880
+ response.response.close()
2881
+ return response.output
2882
+
2883
+ def iter_list_sandboxes_for_project(
2884
+ self,
2885
+ project_name: "capo_codebuild.types.non_empty_string.NonEmptyString",
2886
+ *,
2887
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2888
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2889
+ sort_order: Optional[
2890
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2891
+ ] = None,
2892
+ next_token: Optional[
2893
+ "capo_codebuild.types.sensitive_string.SensitiveString"
2894
+ ] = None,
2895
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
2896
+ _token = next_token
2897
+ while True:
2898
+ _response = self.list_sandboxes_for_project(
2899
+ project_name,
2900
+ config_overrides=config_overrides,
2901
+ max_results=max_results,
2902
+ sort_order=sort_order,
2903
+ next_token=_token,
2904
+ )
2905
+ _page = _resolve_path(_response, ("ids",))
2906
+ for _item in _page or []:
2907
+ yield _item
2908
+ _token = _resolve_path(_response, ("next_token",))
2909
+ if not _token:
2910
+ break
2911
+
2912
+ def list_shared_projects(
2913
+ self,
2914
+ *,
2915
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2916
+ sort_by: Optional[
2917
+ "capo_codebuild.types.shared_resource_sort_by_type.SharedResourceSortByType"
2918
+ ] = None,
2919
+ sort_order: Optional[
2920
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2921
+ ] = None,
2922
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2923
+ next_token: Optional[
2924
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
2925
+ ] = None,
2926
+ ) -> "capo_codebuild.types.list_shared_projects_output.ListSharedProjectsOutput":
2927
+ """<p> Gets a list of projects that are shared with other Amazon Web Services accounts or users. </p>
2928
+
2929
+ Args:
2930
+ sort_by: <p> The criterion to be used to list build projects shared with the current Amazon Web Services account or user. Valid values include: </p> <ul> <li> <p> <code>ARN</code>: List based on the ARN. </p> </li> <li> <p> <code>MODIFIED_TIME</code>: List based on when information about the shared project was last changed. </p> </li> </ul>
2931
+ sort_order: <p>The order in which to list shared build projects. Valid values include:</p> <ul> <li> <p> <code>ASCENDING</code>: List in ascending order.</p> </li> <li> <p> <code>DESCENDING</code>: List in descending order.</p> </li> </ul>
2932
+ max_results: <p> The maximum number of paginated shared build projects returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>Project</code> objects. The default value is 100. </p>
2933
+ next_token: <p> During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. </p>
2934
+
2935
+ Raises:
2936
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
2937
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
2938
+ """
2939
+
2940
+ def _handler(
2941
+ req: "OperationRequest[capo_codebuild.types.list_shared_projects_input.ListSharedProjectsInput]",
2942
+ ) -> OperationResponse[
2943
+ "capo_codebuild.types.list_shared_projects_output.ListSharedProjectsOutput"
2944
+ ]:
2945
+ import capo_codebuild._operations.code_build_20161006.list_shared_projects
2946
+
2947
+ output, http_response = (
2948
+ capo_codebuild._operations.code_build_20161006.list_shared_projects.list_shared_projects(
2949
+ req.options, req.input
2950
+ )
2951
+ )
2952
+ return OperationResponse(output=output, response=http_response)
2953
+
2954
+ interceptors_, options_ = self.operation_options(config_overrides)
2955
+ input_: capo_codebuild.types.list_shared_projects_input.ListSharedProjectsInput = {}
2956
+ if sort_by is not None:
2957
+ input_["sort_by"] = sort_by
2958
+ if sort_order is not None:
2959
+ input_["sort_order"] = sort_order
2960
+ if max_results is not None:
2961
+ input_["max_results"] = max_results
2962
+ if next_token is not None:
2963
+ input_["next_token"] = next_token
2964
+
2965
+ response = execute_pipeline(
2966
+ OperationRequest(input=input_, options=options_),
2967
+ handler=_handler,
2968
+ interceptors=list(interceptors_),
2969
+ )
2970
+ response.response.close()
2971
+ return response.output
2972
+
2973
+ def iter_list_shared_projects(
2974
+ self,
2975
+ *,
2976
+ config_overrides: Optional[CodeBuildClientConfig] = None,
2977
+ sort_by: Optional[
2978
+ "capo_codebuild.types.shared_resource_sort_by_type.SharedResourceSortByType"
2979
+ ] = None,
2980
+ sort_order: Optional[
2981
+ "capo_codebuild.types.sort_order_type.SortOrderType"
2982
+ ] = None,
2983
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
2984
+ next_token: Optional[
2985
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
2986
+ ] = None,
2987
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
2988
+ _token = next_token
2989
+ while True:
2990
+ _response = self.list_shared_projects(
2991
+ config_overrides=config_overrides,
2992
+ sort_by=sort_by,
2993
+ sort_order=sort_order,
2994
+ max_results=max_results,
2995
+ next_token=_token,
2996
+ )
2997
+ _page = _resolve_path(_response, ("projects",))
2998
+ for _item in _page or []:
2999
+ yield _item
3000
+ _token = _resolve_path(_response, ("next_token",))
3001
+ if not _token:
3002
+ break
3003
+
3004
+ def list_shared_report_groups(
3005
+ self,
3006
+ *,
3007
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3008
+ sort_order: Optional[
3009
+ "capo_codebuild.types.sort_order_type.SortOrderType"
3010
+ ] = None,
3011
+ sort_by: Optional[
3012
+ "capo_codebuild.types.shared_resource_sort_by_type.SharedResourceSortByType"
3013
+ ] = None,
3014
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
3015
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
3016
+ ) -> "capo_codebuild.types.list_shared_report_groups_output.ListSharedReportGroupsOutput":
3017
+ """<p> Gets a list of report groups that are shared with other Amazon Web Services accounts or users. </p>
3018
+
3019
+ Args:
3020
+ sort_order: <p>The order in which to list shared report groups. Valid values include:</p> <ul> <li> <p> <code>ASCENDING</code>: List in ascending order.</p> </li> <li> <p> <code>DESCENDING</code>: List in descending order.</p> </li> </ul>
3021
+ sort_by: <p> The criterion to be used to list report groups shared with the current Amazon Web Services account or user. Valid values include: </p> <ul> <li> <p> <code>ARN</code>: List based on the ARN. </p> </li> <li> <p> <code>MODIFIED_TIME</code>: List based on when information about the shared report group was last changed. </p> </li> </ul>
3022
+ next_token: <p> During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. </p>
3023
+ max_results: <p> The maximum number of paginated shared report groups per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>ReportGroup</code> objects. The default value is 100. </p>
3024
+
3025
+ Raises:
3026
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3027
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3028
+ """
3029
+
3030
+ def _handler(
3031
+ req: "OperationRequest[capo_codebuild.types.list_shared_report_groups_input.ListSharedReportGroupsInput]",
3032
+ ) -> OperationResponse[
3033
+ "capo_codebuild.types.list_shared_report_groups_output.ListSharedReportGroupsOutput"
3034
+ ]:
3035
+ import capo_codebuild._operations.code_build_20161006.list_shared_report_groups
3036
+
3037
+ output, http_response = (
3038
+ capo_codebuild._operations.code_build_20161006.list_shared_report_groups.list_shared_report_groups(
3039
+ req.options, req.input
3040
+ )
3041
+ )
3042
+ return OperationResponse(output=output, response=http_response)
3043
+
3044
+ interceptors_, options_ = self.operation_options(config_overrides)
3045
+ input_: capo_codebuild.types.list_shared_report_groups_input.ListSharedReportGroupsInput = {}
3046
+ if sort_order is not None:
3047
+ input_["sort_order"] = sort_order
3048
+ if sort_by is not None:
3049
+ input_["sort_by"] = sort_by
3050
+ if next_token is not None:
3051
+ input_["next_token"] = next_token
3052
+ if max_results is not None:
3053
+ input_["max_results"] = max_results
3054
+
3055
+ response = execute_pipeline(
3056
+ OperationRequest(input=input_, options=options_),
3057
+ handler=_handler,
3058
+ interceptors=list(interceptors_),
3059
+ )
3060
+ response.response.close()
3061
+ return response.output
3062
+
3063
+ def iter_list_shared_report_groups(
3064
+ self,
3065
+ *,
3066
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3067
+ sort_order: Optional[
3068
+ "capo_codebuild.types.sort_order_type.SortOrderType"
3069
+ ] = None,
3070
+ sort_by: Optional[
3071
+ "capo_codebuild.types.shared_resource_sort_by_type.SharedResourceSortByType"
3072
+ ] = None,
3073
+ next_token: Optional["capo_codebuild.types.string.String"] = None,
3074
+ max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
3075
+ ) -> "Iterator[capo_codebuild.types.non_empty_string.NonEmptyString]":
3076
+ _token = next_token
3077
+ while True:
3078
+ _response = self.list_shared_report_groups(
3079
+ config_overrides=config_overrides,
3080
+ sort_order=sort_order,
3081
+ sort_by=sort_by,
3082
+ next_token=_token,
3083
+ max_results=max_results,
3084
+ )
3085
+ _page = _resolve_path(_response, ("report_groups",))
3086
+ for _item in _page or []:
3087
+ yield _item
3088
+ _token = _resolve_path(_response, ("next_token",))
3089
+ if not _token:
3090
+ break
3091
+
3092
+ def list_source_credentials(
3093
+ self, *, config_overrides: Optional[CodeBuildClientConfig] = None
3094
+ ) -> "capo_codebuild.types.list_source_credentials_output.ListSourceCredentialsOutput":
3095
+ """<p> Returns a list of <code>SourceCredentialsInfo</code> objects. </p>
3096
+
3097
+ Raises:
3098
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3099
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3100
+ """
3101
+
3102
+ def _handler(
3103
+ req: "OperationRequest[capo_codebuild.types.list_source_credentials_input.ListSourceCredentialsInput]",
3104
+ ) -> OperationResponse[
3105
+ "capo_codebuild.types.list_source_credentials_output.ListSourceCredentialsOutput"
3106
+ ]:
3107
+ import capo_codebuild._operations.code_build_20161006.list_source_credentials
3108
+
3109
+ output, http_response = (
3110
+ capo_codebuild._operations.code_build_20161006.list_source_credentials.list_source_credentials(
3111
+ req.options, req.input
3112
+ )
3113
+ )
3114
+ return OperationResponse(output=output, response=http_response)
3115
+
3116
+ interceptors_, options_ = self.operation_options(config_overrides)
3117
+ input_: capo_codebuild.types.list_source_credentials_input.ListSourceCredentialsInput = {}
3118
+
3119
+ response = execute_pipeline(
3120
+ OperationRequest(input=input_, options=options_),
3121
+ handler=_handler,
3122
+ interceptors=list(interceptors_),
3123
+ )
3124
+ response.response.close()
3125
+ return response.output
3126
+
3127
+ def put_resource_policy(
3128
+ self,
3129
+ policy: "capo_codebuild.types.non_empty_string.NonEmptyString",
3130
+ resource_arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
3131
+ *,
3132
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3133
+ ) -> "capo_codebuild.types.put_resource_policy_output.PutResourcePolicyOutput":
3134
+ r"""<p> Stores a resource policy for the ARN of a <code>Project</code> or <code>ReportGroup</code> object. </p>
3135
+
3136
+ Args:
3137
+ policy: <p> A JSON-formatted resource policy. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/project-sharing.html#project-sharing-share\">Sharing a Project</a> and <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/report-groups-sharing.html#report-groups-sharing-share\">Sharing a Report Group</a> in the <i>CodeBuild User Guide</i>. </p>
3138
+ resource_arn: <p> The ARN of the <code>Project</code> or <code>ReportGroup</code> resource you want to associate with a resource policy. </p>
3139
+
3140
+ Raises:
3141
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3142
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3143
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3144
+ """
3145
+
3146
+ def _handler(
3147
+ req: "OperationRequest[capo_codebuild.types.put_resource_policy_input.PutResourcePolicyInput]",
3148
+ ) -> OperationResponse[
3149
+ "capo_codebuild.types.put_resource_policy_output.PutResourcePolicyOutput"
3150
+ ]:
3151
+ import capo_codebuild._operations.code_build_20161006.put_resource_policy
3152
+
3153
+ output, http_response = (
3154
+ capo_codebuild._operations.code_build_20161006.put_resource_policy.put_resource_policy(
3155
+ req.options, req.input
3156
+ )
3157
+ )
3158
+ return OperationResponse(output=output, response=http_response)
3159
+
3160
+ interceptors_, options_ = self.operation_options(config_overrides)
3161
+ input_: capo_codebuild.types.put_resource_policy_input.PutResourcePolicyInput = {
3162
+ "policy": policy,
3163
+ "resource_arn": resource_arn,
3164
+ }
3165
+
3166
+ response = execute_pipeline(
3167
+ OperationRequest(input=input_, options=options_),
3168
+ handler=_handler,
3169
+ interceptors=list(interceptors_),
3170
+ )
3171
+ response.response.close()
3172
+ return response.output
3173
+
3174
+ def retry_build(
3175
+ self,
3176
+ *,
3177
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3178
+ id: Optional["capo_codebuild.types.non_empty_string.NonEmptyString"] = None,
3179
+ idempotency_token: Optional["capo_codebuild.types.string.String"] = None,
3180
+ ) -> "capo_codebuild.types.retry_build_output.RetryBuildOutput":
3181
+ """<p>Restarts a build.</p>
3182
+
3183
+ Args:
3184
+ id: <p>Specifies the identifier of the build to restart.</p>
3185
+ idempotency_token: <p>A unique, case sensitive identifier you provide to ensure the idempotency of the <code>RetryBuild</code> request. The token is included in the <code>RetryBuild</code> request and is valid for five minutes. If you repeat the <code>RetryBuild</code> request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
3186
+
3187
+ Raises:
3188
+ capo_codebuild.errors.account_limit_exceeded_exception.AccountLimitExceededException: <p>An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.</p>
3189
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3190
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3191
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3192
+ """
3193
+
3194
+ def _handler(
3195
+ req: "OperationRequest[capo_codebuild.types.retry_build_input.RetryBuildInput]",
3196
+ ) -> OperationResponse[
3197
+ "capo_codebuild.types.retry_build_output.RetryBuildOutput"
3198
+ ]:
3199
+ import capo_codebuild._operations.code_build_20161006.retry_build
3200
+
3201
+ output, http_response = (
3202
+ capo_codebuild._operations.code_build_20161006.retry_build.retry_build(
3203
+ req.options, req.input
3204
+ )
3205
+ )
3206
+ return OperationResponse(output=output, response=http_response)
3207
+
3208
+ interceptors_, options_ = self.operation_options(config_overrides)
3209
+ input_: capo_codebuild.types.retry_build_input.RetryBuildInput = {}
3210
+ if id is not None:
3211
+ input_["id"] = id
3212
+ if idempotency_token is not None:
3213
+ input_["idempotency_token"] = idempotency_token
3214
+
3215
+ response = execute_pipeline(
3216
+ OperationRequest(input=input_, options=options_),
3217
+ handler=_handler,
3218
+ interceptors=list(interceptors_),
3219
+ )
3220
+ response.response.close()
3221
+ return response.output
3222
+
3223
+ def retry_build_batch(
3224
+ self,
3225
+ *,
3226
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3227
+ id: Optional["capo_codebuild.types.non_empty_string.NonEmptyString"] = None,
3228
+ idempotency_token: Optional["capo_codebuild.types.string.String"] = None,
3229
+ retry_type: Optional[
3230
+ "capo_codebuild.types.retry_build_batch_type.RetryBuildBatchType"
3231
+ ] = None,
3232
+ ) -> "capo_codebuild.types.retry_build_batch_output.RetryBuildBatchOutput":
3233
+ """<p>Restarts a failed batch build. Only batch builds that have failed can be retried.</p>
3234
+
3235
+ Args:
3236
+ id: <p>Specifies the identifier of the batch build to restart.</p>
3237
+ idempotency_token: <p>A unique, case sensitive identifier you provide to ensure the idempotency of the <code>RetryBuildBatch</code> request. The token is included in the <code>RetryBuildBatch</code> request and is valid for five minutes. If you repeat the <code>RetryBuildBatch</code> request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
3238
+ retry_type: <p>Specifies the type of retry to perform.</p>
3239
+
3240
+ Raises:
3241
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3242
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3243
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3244
+ """
3245
+
3246
+ def _handler(
3247
+ req: "OperationRequest[capo_codebuild.types.retry_build_batch_input.RetryBuildBatchInput]",
3248
+ ) -> OperationResponse[
3249
+ "capo_codebuild.types.retry_build_batch_output.RetryBuildBatchOutput"
3250
+ ]:
3251
+ import capo_codebuild._operations.code_build_20161006.retry_build_batch
3252
+
3253
+ output, http_response = (
3254
+ capo_codebuild._operations.code_build_20161006.retry_build_batch.retry_build_batch(
3255
+ req.options, req.input
3256
+ )
3257
+ )
3258
+ return OperationResponse(output=output, response=http_response)
3259
+
3260
+ interceptors_, options_ = self.operation_options(config_overrides)
3261
+ input_: capo_codebuild.types.retry_build_batch_input.RetryBuildBatchInput = {}
3262
+ if id is not None:
3263
+ input_["id"] = id
3264
+ if idempotency_token is not None:
3265
+ input_["idempotency_token"] = idempotency_token
3266
+ if retry_type is not None:
3267
+ input_["retry_type"] = retry_type
3268
+
3269
+ response = execute_pipeline(
3270
+ OperationRequest(input=input_, options=options_),
3271
+ handler=_handler,
3272
+ interceptors=list(interceptors_),
3273
+ )
3274
+ response.response.close()
3275
+ return response.output
3276
+
3277
+ def start_build(
3278
+ self,
3279
+ project_name: "capo_codebuild.types.non_empty_string.NonEmptyString",
3280
+ *,
3281
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3282
+ secondary_sources_override: Optional[
3283
+ "capo_codebuild.types.project_sources.ProjectSources"
3284
+ ] = None,
3285
+ secondary_sources_version_override: Optional[
3286
+ "capo_codebuild.types.project_secondary_source_versions.ProjectSecondarySourceVersions"
3287
+ ] = None,
3288
+ source_version: Optional["capo_codebuild.types.string.String"] = None,
3289
+ artifacts_override: Optional[
3290
+ "capo_codebuild.types.project_artifacts.ProjectArtifacts"
3291
+ ] = None,
3292
+ secondary_artifacts_override: Optional[
3293
+ "capo_codebuild.types.project_artifacts_list.ProjectArtifactsList"
3294
+ ] = None,
3295
+ environment_variables_override: Optional[
3296
+ "capo_codebuild.types.environment_variables.EnvironmentVariables"
3297
+ ] = None,
3298
+ source_type_override: Optional[
3299
+ "capo_codebuild.types.source_type.SourceType"
3300
+ ] = None,
3301
+ source_location_override: Optional["capo_codebuild.types.string.String"] = None,
3302
+ source_auth_override: Optional[
3303
+ "capo_codebuild.types.source_auth.SourceAuth"
3304
+ ] = None,
3305
+ git_clone_depth_override: Optional[
3306
+ "capo_codebuild.types.git_clone_depth.GitCloneDepth"
3307
+ ] = None,
3308
+ git_submodules_config_override: Optional[
3309
+ "capo_codebuild.types.git_submodules_config.GitSubmodulesConfig"
3310
+ ] = None,
3311
+ buildspec_override: Optional["capo_codebuild.types.string.String"] = None,
3312
+ insecure_ssl_override: Optional[
3313
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
3314
+ ] = None,
3315
+ report_build_status_override: Optional[
3316
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
3317
+ ] = None,
3318
+ build_status_config_override: Optional[
3319
+ "capo_codebuild.types.build_status_config.BuildStatusConfig"
3320
+ ] = None,
3321
+ environment_type_override: Optional[
3322
+ "capo_codebuild.types.environment_type.EnvironmentType"
3323
+ ] = None,
3324
+ image_override: Optional[
3325
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
3326
+ ] = None,
3327
+ compute_type_override: Optional[
3328
+ "capo_codebuild.types.compute_type.ComputeType"
3329
+ ] = None,
3330
+ certificate_override: Optional["capo_codebuild.types.string.String"] = None,
3331
+ cache_override: Optional[
3332
+ "capo_codebuild.types.project_cache.ProjectCache"
3333
+ ] = None,
3334
+ service_role_override: Optional[
3335
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
3336
+ ] = None,
3337
+ privileged_mode_override: Optional[
3338
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
3339
+ ] = None,
3340
+ timeout_in_minutes_override: Optional[
3341
+ "capo_codebuild.types.build_time_out.BuildTimeOut"
3342
+ ] = None,
3343
+ queued_timeout_in_minutes_override: Optional[
3344
+ "capo_codebuild.types.time_out.TimeOut"
3345
+ ] = None,
3346
+ encryption_key_override: Optional[
3347
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
3348
+ ] = None,
3349
+ idempotency_token: Optional["capo_codebuild.types.string.String"] = None,
3350
+ logs_config_override: Optional[
3351
+ "capo_codebuild.types.logs_config.LogsConfig"
3352
+ ] = None,
3353
+ registry_credential_override: Optional[
3354
+ "capo_codebuild.types.registry_credential.RegistryCredential"
3355
+ ] = None,
3356
+ image_pull_credentials_type_override: Optional[
3357
+ "capo_codebuild.types.image_pull_credentials_type.ImagePullCredentialsType"
3358
+ ] = None,
3359
+ debug_session_enabled: Optional[
3360
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
3361
+ ] = None,
3362
+ fleet_override: Optional[
3363
+ "capo_codebuild.types.project_fleet.ProjectFleet"
3364
+ ] = None,
3365
+ auto_retry_limit_override: Optional[
3366
+ "capo_codebuild.types.wrapper_int.WrapperInt"
3367
+ ] = None,
3368
+ ) -> "capo_codebuild.types.start_build_output.StartBuildOutput":
3369
+ r"""<p>Starts running a build with the settings defined in the project. These setting include: how to run a build, where to get the source code, which build environment to use, which build commands to run, and where to store the build output.</p> <p>You can also start a build run by overriding some of the build settings in the project. The overrides only apply for that specific start build request. The settings in the project are unaltered.</p>
3370
+
3371
+ Args:
3372
+ project_name: <p>The name of the CodeBuild build project to start running a build.</p>
3373
+ secondary_sources_override: <p> An array of <code>ProjectSource</code> objects. </p>
3374
+ secondary_sources_version_override: <p> An array of <code>ProjectSourceVersion</code> objects that specify one or more versions of the project's secondary sources to be used for this build only. </p>
3375
+ source_version: <p>The version of the build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:</p> <dl> <dt>CodeCommit</dt> <dd> <p>The commit ID, branch, or Git tag to use.</p> </dd> <dt>GitHub</dt> <dd> <p>The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p> </dd> <dt>GitLab</dt> <dd> <p>The commit ID, branch, or Git tag to use.</p> </dd> <dt>Bitbucket</dt> <dd> <p>The commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p> </dd> <dt>Amazon S3</dt> <dd> <p>The version ID of the object that represents the build input ZIP file to use.</p> </dd> </dl> <p>If <code>sourceVersion</code> is specified at the project level, then this <code>sourceVersion</code> (at the build level) takes precedence. </p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html\">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>. </p>
3376
+ artifacts_override: <p>Build output artifact settings that override, for this build only, the latest ones already defined in the build project.</p>
3377
+ secondary_artifacts_override: <p> An array of <code>ProjectArtifacts</code> objects. </p>
3378
+ environment_variables_override: <p>A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.</p>
3379
+ source_type_override: <p>A source input type, for this build, that overrides the source input defined in the build project.</p>
3380
+ source_location_override: <p>A location that overrides, for this build, the source location for the one defined in the build project.</p>
3381
+ source_auth_override: <p>An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket, GitHub, GitLab, or GitLab Self Managed.</p>
3382
+ git_clone_depth_override: <p>The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous depth of history defined in the build project.</p>
3383
+ git_submodules_config_override: <p> Information about the Git submodules configuration for this build of an CodeBuild build project. </p>
3384
+ buildspec_override: <p>A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The buildspec defined on the project is not changed.</p> <p>If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in <code>CODEBUILD_SRC_DIR</code> environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, <code>arn:aws:s3:::my-codebuild-sample2/buildspec.yml</code>). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage\">Buildspec File Name and Storage Location</a>.</p> <note> <p>Since this property allows you to change the build commands that will run in the container, you should note that an IAM principal with the ability to call this API and set this parameter can override the default settings. Moreover, we encourage that you use a trustworthy buildspec location like a file in your source repository or a Amazon S3 bucket. Alternatively, you can restrict overrides to the buildspec by using a condition key: <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/action-context-keys.html#action-context-keys-example-overridebuildspec.html\">Prevent unauthorized modifications to project buildspec</a>.</p> </note>
3385
+ insecure_ssl_override: <p>Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.</p>
3386
+ report_build_status_override: <p> Set to true to report to your source provider the status of a build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket, an <code>invalidInputException</code> is thrown. </p> <p>To be able to report the build status to the source provider, the user associated with the source provider must have write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html\">Source provider access</a> in the <i>CodeBuild User Guide</i>.</p> <note> <p> The status of a build triggered by a webhook is always reported to your source provider. </p> </note>
3387
+ build_status_config_override: <p>Contains information that defines how the build project reports the build status to the source provider. This option is only used when the source provider is <code>GITHUB</code>, <code>GITHUB_ENTERPRISE</code>, or <code>BITBUCKET</code>.</p>
3388
+ environment_type_override: <p>A container type for this build that overrides the one specified in the build project.</p>
3389
+ image_override: <p>The name of an image for this build that overrides the one specified in the build project.</p>
3390
+ compute_type_override: <p>The name of a compute type for this build that overrides the one specified in the build project.</p>
3391
+ certificate_override: <p>The name of a certificate for this build that overrides the one specified in the build project.</p>
3392
+ cache_override: <p>A ProjectCache object specified for this build that overrides the one defined in the build project.</p>
3393
+ service_role_override: <p>The name of a service role for this build that overrides the one specified in the build project.</p>
3394
+ privileged_mode_override: <p>Enable this flag to override privileged mode in the build project.</p>
3395
+ timeout_in_minutes_override: <p>The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this build only, the latest setting already defined in the build project.</p>
3396
+ queued_timeout_in_minutes_override: <p> The number of minutes a build is allowed to be queued before it times out. </p>
3397
+ encryption_key_override: <p>The Key Management Service customer master key (CMK) that overrides the one specified in the build project. The CMK key encrypts the build output artifacts.</p> <note> <p> You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key. </p> </note> <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/<alias-name></code>).</p>
3398
+ idempotency_token: <p>A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error. </p>
3399
+ logs_config_override: <p> Log settings for this build that override the log settings defined in the build project. </p>
3400
+ registry_credential_override: <p> The credentials for access to a private registry. </p>
3401
+ image_pull_credentials_type_override: <p>The type of credentials CodeBuild uses to pull images in your build. There are two valid values: </p> <dl> <dt>CODEBUILD</dt> <dd> <p>Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.</p> </dd> <dt>SERVICE_ROLE</dt> <dd> <p>Specifies that CodeBuild uses your build project's service role. </p> </dd> </dl> <p>When using a cross-account or private registry image, you must use <code>SERVICE_ROLE</code> credentials. When using an CodeBuild curated image, you must use <code>CODEBUILD</code> credentials. </p>
3402
+ debug_session_enabled: <p>Specifies if session debugging is enabled for this build. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html\">Viewing a running build in Session Manager</a>.</p>
3403
+ fleet_override: <p>A ProjectFleet object specified for this build that overrides the one defined in the build project.</p>
3404
+ auto_retry_limit_override: <p>The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically retry your build for up to 2 additional times.</p>
3405
+
3406
+ Raises:
3407
+ capo_codebuild.errors.account_limit_exceeded_exception.AccountLimitExceededException: <p>An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.</p>
3408
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3409
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3410
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3411
+ """
3412
+
3413
+ def _handler(
3414
+ req: "OperationRequest[capo_codebuild.types.start_build_input.StartBuildInput]",
3415
+ ) -> OperationResponse[
3416
+ "capo_codebuild.types.start_build_output.StartBuildOutput"
3417
+ ]:
3418
+ import capo_codebuild._operations.code_build_20161006.start_build
3419
+
3420
+ output, http_response = (
3421
+ capo_codebuild._operations.code_build_20161006.start_build.start_build(
3422
+ req.options, req.input
3423
+ )
3424
+ )
3425
+ return OperationResponse(output=output, response=http_response)
3426
+
3427
+ interceptors_, options_ = self.operation_options(config_overrides)
3428
+ input_: capo_codebuild.types.start_build_input.StartBuildInput = {
3429
+ "project_name": project_name
3430
+ }
3431
+ if secondary_sources_override is not None:
3432
+ input_["secondary_sources_override"] = secondary_sources_override
3433
+ if secondary_sources_version_override is not None:
3434
+ input_["secondary_sources_version_override"] = (
3435
+ secondary_sources_version_override
3436
+ )
3437
+ if source_version is not None:
3438
+ input_["source_version"] = source_version
3439
+ if artifacts_override is not None:
3440
+ input_["artifacts_override"] = artifacts_override
3441
+ if secondary_artifacts_override is not None:
3442
+ input_["secondary_artifacts_override"] = secondary_artifacts_override
3443
+ if environment_variables_override is not None:
3444
+ input_["environment_variables_override"] = environment_variables_override
3445
+ if source_type_override is not None:
3446
+ input_["source_type_override"] = source_type_override
3447
+ if source_location_override is not None:
3448
+ input_["source_location_override"] = source_location_override
3449
+ if source_auth_override is not None:
3450
+ input_["source_auth_override"] = source_auth_override
3451
+ if git_clone_depth_override is not None:
3452
+ input_["git_clone_depth_override"] = git_clone_depth_override
3453
+ if git_submodules_config_override is not None:
3454
+ input_["git_submodules_config_override"] = git_submodules_config_override
3455
+ if buildspec_override is not None:
3456
+ input_["buildspec_override"] = buildspec_override
3457
+ if insecure_ssl_override is not None:
3458
+ input_["insecure_ssl_override"] = insecure_ssl_override
3459
+ if report_build_status_override is not None:
3460
+ input_["report_build_status_override"] = report_build_status_override
3461
+ if build_status_config_override is not None:
3462
+ input_["build_status_config_override"] = build_status_config_override
3463
+ if environment_type_override is not None:
3464
+ input_["environment_type_override"] = environment_type_override
3465
+ if image_override is not None:
3466
+ input_["image_override"] = image_override
3467
+ if compute_type_override is not None:
3468
+ input_["compute_type_override"] = compute_type_override
3469
+ if certificate_override is not None:
3470
+ input_["certificate_override"] = certificate_override
3471
+ if cache_override is not None:
3472
+ input_["cache_override"] = cache_override
3473
+ if service_role_override is not None:
3474
+ input_["service_role_override"] = service_role_override
3475
+ if privileged_mode_override is not None:
3476
+ input_["privileged_mode_override"] = privileged_mode_override
3477
+ if timeout_in_minutes_override is not None:
3478
+ input_["timeout_in_minutes_override"] = timeout_in_minutes_override
3479
+ if queued_timeout_in_minutes_override is not None:
3480
+ input_["queued_timeout_in_minutes_override"] = (
3481
+ queued_timeout_in_minutes_override
3482
+ )
3483
+ if encryption_key_override is not None:
3484
+ input_["encryption_key_override"] = encryption_key_override
3485
+ if idempotency_token is not None:
3486
+ input_["idempotency_token"] = idempotency_token
3487
+ if logs_config_override is not None:
3488
+ input_["logs_config_override"] = logs_config_override
3489
+ if registry_credential_override is not None:
3490
+ input_["registry_credential_override"] = registry_credential_override
3491
+ if image_pull_credentials_type_override is not None:
3492
+ input_["image_pull_credentials_type_override"] = (
3493
+ image_pull_credentials_type_override
3494
+ )
3495
+ if debug_session_enabled is not None:
3496
+ input_["debug_session_enabled"] = debug_session_enabled
3497
+ if fleet_override is not None:
3498
+ input_["fleet_override"] = fleet_override
3499
+ if auto_retry_limit_override is not None:
3500
+ input_["auto_retry_limit_override"] = auto_retry_limit_override
3501
+
3502
+ response = execute_pipeline(
3503
+ OperationRequest(input=input_, options=options_),
3504
+ handler=_handler,
3505
+ interceptors=list(interceptors_),
3506
+ )
3507
+ response.response.close()
3508
+ return response.output
3509
+
3510
+ def start_build_batch(
3511
+ self,
3512
+ project_name: "capo_codebuild.types.non_empty_string.NonEmptyString",
3513
+ *,
3514
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3515
+ secondary_sources_override: Optional[
3516
+ "capo_codebuild.types.project_sources.ProjectSources"
3517
+ ] = None,
3518
+ secondary_sources_version_override: Optional[
3519
+ "capo_codebuild.types.project_secondary_source_versions.ProjectSecondarySourceVersions"
3520
+ ] = None,
3521
+ source_version: Optional["capo_codebuild.types.string.String"] = None,
3522
+ artifacts_override: Optional[
3523
+ "capo_codebuild.types.project_artifacts.ProjectArtifacts"
3524
+ ] = None,
3525
+ secondary_artifacts_override: Optional[
3526
+ "capo_codebuild.types.project_artifacts_list.ProjectArtifactsList"
3527
+ ] = None,
3528
+ environment_variables_override: Optional[
3529
+ "capo_codebuild.types.environment_variables.EnvironmentVariables"
3530
+ ] = None,
3531
+ source_type_override: Optional[
3532
+ "capo_codebuild.types.source_type.SourceType"
3533
+ ] = None,
3534
+ source_location_override: Optional["capo_codebuild.types.string.String"] = None,
3535
+ source_auth_override: Optional[
3536
+ "capo_codebuild.types.source_auth.SourceAuth"
3537
+ ] = None,
3538
+ git_clone_depth_override: Optional[
3539
+ "capo_codebuild.types.git_clone_depth.GitCloneDepth"
3540
+ ] = None,
3541
+ git_submodules_config_override: Optional[
3542
+ "capo_codebuild.types.git_submodules_config.GitSubmodulesConfig"
3543
+ ] = None,
3544
+ buildspec_override: Optional["capo_codebuild.types.string.String"] = None,
3545
+ insecure_ssl_override: Optional[
3546
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
3547
+ ] = None,
3548
+ report_build_batch_status_override: Optional[
3549
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
3550
+ ] = None,
3551
+ environment_type_override: Optional[
3552
+ "capo_codebuild.types.environment_type.EnvironmentType"
3553
+ ] = None,
3554
+ image_override: Optional[
3555
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
3556
+ ] = None,
3557
+ compute_type_override: Optional[
3558
+ "capo_codebuild.types.compute_type.ComputeType"
3559
+ ] = None,
3560
+ certificate_override: Optional["capo_codebuild.types.string.String"] = None,
3561
+ cache_override: Optional[
3562
+ "capo_codebuild.types.project_cache.ProjectCache"
3563
+ ] = None,
3564
+ service_role_override: Optional[
3565
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
3566
+ ] = None,
3567
+ privileged_mode_override: Optional[
3568
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
3569
+ ] = None,
3570
+ build_timeout_in_minutes_override: Optional[
3571
+ "capo_codebuild.types.build_time_out.BuildTimeOut"
3572
+ ] = None,
3573
+ queued_timeout_in_minutes_override: Optional[
3574
+ "capo_codebuild.types.time_out.TimeOut"
3575
+ ] = None,
3576
+ encryption_key_override: Optional[
3577
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
3578
+ ] = None,
3579
+ idempotency_token: Optional["capo_codebuild.types.string.String"] = None,
3580
+ logs_config_override: Optional[
3581
+ "capo_codebuild.types.logs_config.LogsConfig"
3582
+ ] = None,
3583
+ registry_credential_override: Optional[
3584
+ "capo_codebuild.types.registry_credential.RegistryCredential"
3585
+ ] = None,
3586
+ image_pull_credentials_type_override: Optional[
3587
+ "capo_codebuild.types.image_pull_credentials_type.ImagePullCredentialsType"
3588
+ ] = None,
3589
+ build_batch_config_override: Optional[
3590
+ "capo_codebuild.types.project_build_batch_config.ProjectBuildBatchConfig"
3591
+ ] = None,
3592
+ debug_session_enabled: Optional[
3593
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
3594
+ ] = None,
3595
+ ) -> "capo_codebuild.types.start_build_batch_output.StartBuildBatchOutput":
3596
+ r"""<p>Starts a batch build for a project.</p>
3597
+
3598
+ Args:
3599
+ project_name: <p>The name of the project.</p>
3600
+ secondary_sources_override: <p>An array of <code>ProjectSource</code> objects that override the secondary sources defined in the batch build project.</p>
3601
+ secondary_sources_version_override: <p>An array of <code>ProjectSourceVersion</code> objects that override the secondary source versions in the batch build project.</p>
3602
+ source_version: <p>The version of the batch build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:</p> <dl> <dt>CodeCommit</dt> <dd> <p>The commit ID, branch, or Git tag to use.</p> </dd> <dt>GitHub</dt> <dd> <p>The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p> </dd> <dt>Bitbucket</dt> <dd> <p>The commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p> </dd> <dt>Amazon S3</dt> <dd> <p>The version ID of the object that represents the build input ZIP file to use.</p> </dd> </dl> <p>If <code>sourceVersion</code> is specified at the project level, then this <code>sourceVersion</code> (at the build level) takes precedence. </p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html\">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>. </p>
3603
+ artifacts_override: <p>An array of <code>ProjectArtifacts</code> objects that contains information about the build output artifact overrides for the build project.</p>
3604
+ secondary_artifacts_override: <p>An array of <code>ProjectArtifacts</code> objects that override the secondary artifacts defined in the batch build project.</p>
3605
+ environment_variables_override: <p>An array of <code>EnvironmentVariable</code> objects that override, or add to, the environment variables defined in the batch build project.</p>
3606
+ source_type_override: <p>The source input type that overrides the source input defined in the batch build project.</p>
3607
+ source_location_override: <p>A location that overrides, for this batch build, the source location defined in the batch build project.</p>
3608
+ source_auth_override: <p>A <code>SourceAuth</code> object that overrides the one defined in the batch build project. This override applies only if the build project's source is BitBucket or GitHub.</p>
3609
+ git_clone_depth_override: <p>The user-defined depth of history, with a minimum value of 0, that overrides, for this batch build only, any previous depth of history defined in the batch build project.</p>
3610
+ git_submodules_config_override: <p>A <code>GitSubmodulesConfig</code> object that overrides the Git submodules configuration for this batch build.</p>
3611
+ buildspec_override: <p>A buildspec file declaration that overrides, for this build only, the latest one already defined in the build project.</p> <p>If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in <code>CODEBUILD_SRC_DIR</code> environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, <code>arn:aws:s3:::my-codebuild-sample2/buildspec.yml</code>). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage\">Buildspec File Name and Storage Location</a>. </p>
3612
+ insecure_ssl_override: <p>Enable this flag to override the insecure SSL setting that is specified in the batch build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.</p>
3613
+ report_build_batch_status_override: <p>Set to <code>true</code> to report to your source provider the status of a batch build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, or Bitbucket, an <code>invalidInputException</code> is thrown. </p> <note> <p>The status of a build triggered by a webhook is always reported to your source provider. </p> </note>
3614
+ environment_type_override: <p>A container type for this batch build that overrides the one specified in the batch build project.</p>
3615
+ image_override: <p>The name of an image for this batch build that overrides the one specified in the batch build project.</p>
3616
+ compute_type_override: <p>The name of a compute type for this batch build that overrides the one specified in the batch build project.</p>
3617
+ certificate_override: <p>The name of a certificate for this batch build that overrides the one specified in the batch build project.</p>
3618
+ cache_override: <p>A <code>ProjectCache</code> object that specifies cache overrides.</p>
3619
+ service_role_override: <p>The name of a service role for this batch build that overrides the one specified in the batch build project.</p>
3620
+ privileged_mode_override: <p>Enable this flag to override privileged mode in the batch build project.</p>
3621
+ build_timeout_in_minutes_override: <p>Overrides the build timeout specified in the batch build project.</p>
3622
+ queued_timeout_in_minutes_override: <p>The number of minutes a batch build is allowed to be queued before it times out.</p>
3623
+ encryption_key_override: <p>The Key Management Service customer master key (CMK) that overrides the one specified in the batch build project. The CMK key encrypts the build output artifacts.</p> <note> <p>You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key. </p> </note> <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/<alias-name></code>).</p>
3624
+ idempotency_token: <p>A unique, case sensitive identifier you provide to ensure the idempotency of the <code>StartBuildBatch</code> request. The token is included in the <code>StartBuildBatch</code> request and is valid for five minutes. If you repeat the <code>StartBuildBatch</code> request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
3625
+ logs_config_override: <p>A <code>LogsConfig</code> object that override the log settings defined in the batch build project.</p>
3626
+ registry_credential_override: <p>A <code>RegistryCredential</code> object that overrides credentials for access to a private registry.</p>
3627
+ image_pull_credentials_type_override: <p>The type of credentials CodeBuild uses to pull images in your batch build. There are two valid values: </p> <dl> <dt>CODEBUILD</dt> <dd> <p>Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.</p> </dd> <dt>SERVICE_ROLE</dt> <dd> <p>Specifies that CodeBuild uses your build project's service role. </p> </dd> </dl> <p>When using a cross-account or private registry image, you must use <code>SERVICE_ROLE</code> credentials. When using an CodeBuild curated image, you must use <code>CODEBUILD</code> credentials. </p>
3628
+ build_batch_config_override: <p>A <code>BuildBatchConfigOverride</code> object that contains batch build configuration overrides.</p>
3629
+ debug_session_enabled: <p>Specifies if session debugging is enabled for this batch build. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html\">Viewing a running build in Session Manager</a>. Batch session debugging is not supported for matrix batch builds.</p>
3630
+
3631
+ Raises:
3632
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3633
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3634
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3635
+ """
3636
+
3637
+ def _handler(
3638
+ req: "OperationRequest[capo_codebuild.types.start_build_batch_input.StartBuildBatchInput]",
3639
+ ) -> OperationResponse[
3640
+ "capo_codebuild.types.start_build_batch_output.StartBuildBatchOutput"
3641
+ ]:
3642
+ import capo_codebuild._operations.code_build_20161006.start_build_batch
3643
+
3644
+ output, http_response = (
3645
+ capo_codebuild._operations.code_build_20161006.start_build_batch.start_build_batch(
3646
+ req.options, req.input
3647
+ )
3648
+ )
3649
+ return OperationResponse(output=output, response=http_response)
3650
+
3651
+ interceptors_, options_ = self.operation_options(config_overrides)
3652
+ input_: capo_codebuild.types.start_build_batch_input.StartBuildBatchInput = {
3653
+ "project_name": project_name
3654
+ }
3655
+ if secondary_sources_override is not None:
3656
+ input_["secondary_sources_override"] = secondary_sources_override
3657
+ if secondary_sources_version_override is not None:
3658
+ input_["secondary_sources_version_override"] = (
3659
+ secondary_sources_version_override
3660
+ )
3661
+ if source_version is not None:
3662
+ input_["source_version"] = source_version
3663
+ if artifacts_override is not None:
3664
+ input_["artifacts_override"] = artifacts_override
3665
+ if secondary_artifacts_override is not None:
3666
+ input_["secondary_artifacts_override"] = secondary_artifacts_override
3667
+ if environment_variables_override is not None:
3668
+ input_["environment_variables_override"] = environment_variables_override
3669
+ if source_type_override is not None:
3670
+ input_["source_type_override"] = source_type_override
3671
+ if source_location_override is not None:
3672
+ input_["source_location_override"] = source_location_override
3673
+ if source_auth_override is not None:
3674
+ input_["source_auth_override"] = source_auth_override
3675
+ if git_clone_depth_override is not None:
3676
+ input_["git_clone_depth_override"] = git_clone_depth_override
3677
+ if git_submodules_config_override is not None:
3678
+ input_["git_submodules_config_override"] = git_submodules_config_override
3679
+ if buildspec_override is not None:
3680
+ input_["buildspec_override"] = buildspec_override
3681
+ if insecure_ssl_override is not None:
3682
+ input_["insecure_ssl_override"] = insecure_ssl_override
3683
+ if report_build_batch_status_override is not None:
3684
+ input_["report_build_batch_status_override"] = (
3685
+ report_build_batch_status_override
3686
+ )
3687
+ if environment_type_override is not None:
3688
+ input_["environment_type_override"] = environment_type_override
3689
+ if image_override is not None:
3690
+ input_["image_override"] = image_override
3691
+ if compute_type_override is not None:
3692
+ input_["compute_type_override"] = compute_type_override
3693
+ if certificate_override is not None:
3694
+ input_["certificate_override"] = certificate_override
3695
+ if cache_override is not None:
3696
+ input_["cache_override"] = cache_override
3697
+ if service_role_override is not None:
3698
+ input_["service_role_override"] = service_role_override
3699
+ if privileged_mode_override is not None:
3700
+ input_["privileged_mode_override"] = privileged_mode_override
3701
+ if build_timeout_in_minutes_override is not None:
3702
+ input_["build_timeout_in_minutes_override"] = (
3703
+ build_timeout_in_minutes_override
3704
+ )
3705
+ if queued_timeout_in_minutes_override is not None:
3706
+ input_["queued_timeout_in_minutes_override"] = (
3707
+ queued_timeout_in_minutes_override
3708
+ )
3709
+ if encryption_key_override is not None:
3710
+ input_["encryption_key_override"] = encryption_key_override
3711
+ if idempotency_token is not None:
3712
+ input_["idempotency_token"] = idempotency_token
3713
+ if logs_config_override is not None:
3714
+ input_["logs_config_override"] = logs_config_override
3715
+ if registry_credential_override is not None:
3716
+ input_["registry_credential_override"] = registry_credential_override
3717
+ if image_pull_credentials_type_override is not None:
3718
+ input_["image_pull_credentials_type_override"] = (
3719
+ image_pull_credentials_type_override
3720
+ )
3721
+ if build_batch_config_override is not None:
3722
+ input_["build_batch_config_override"] = build_batch_config_override
3723
+ if debug_session_enabled is not None:
3724
+ input_["debug_session_enabled"] = debug_session_enabled
3725
+
3726
+ response = execute_pipeline(
3727
+ OperationRequest(input=input_, options=options_),
3728
+ handler=_handler,
3729
+ interceptors=list(interceptors_),
3730
+ )
3731
+ response.response.close()
3732
+ return response.output
3733
+
3734
+ def start_command_execution(
3735
+ self,
3736
+ sandbox_id: "capo_codebuild.types.non_empty_string.NonEmptyString",
3737
+ command: "capo_codebuild.types.sensitive_non_empty_string.SensitiveNonEmptyString",
3738
+ *,
3739
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3740
+ type: Optional["capo_codebuild.types.command_type.CommandType"] = None,
3741
+ ) -> "capo_codebuild.types.start_command_execution_output.StartCommandExecutionOutput":
3742
+ """<p>Starts a command execution.</p>
3743
+
3744
+ Args:
3745
+ sandbox_id: <p>A <code>sandboxId</code> or <code>sandboxArn</code>.</p>
3746
+ command: <p>The command that needs to be executed.</p>
3747
+ type: <p>The command type.</p>
3748
+
3749
+ Raises:
3750
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3751
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3752
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3753
+ """
3754
+
3755
+ def _handler(
3756
+ req: "OperationRequest[capo_codebuild.types.start_command_execution_input.StartCommandExecutionInput]",
3757
+ ) -> OperationResponse[
3758
+ "capo_codebuild.types.start_command_execution_output.StartCommandExecutionOutput"
3759
+ ]:
3760
+ import capo_codebuild._operations.code_build_20161006.start_command_execution
3761
+
3762
+ output, http_response = (
3763
+ capo_codebuild._operations.code_build_20161006.start_command_execution.start_command_execution(
3764
+ req.options, req.input
3765
+ )
3766
+ )
3767
+ return OperationResponse(output=output, response=http_response)
3768
+
3769
+ interceptors_, options_ = self.operation_options(config_overrides)
3770
+ input_: capo_codebuild.types.start_command_execution_input.StartCommandExecutionInput = {
3771
+ "sandbox_id": sandbox_id,
3772
+ "command": command,
3773
+ }
3774
+ if type is not None:
3775
+ input_["type"] = type
3776
+
3777
+ response = execute_pipeline(
3778
+ OperationRequest(input=input_, options=options_),
3779
+ handler=_handler,
3780
+ interceptors=list(interceptors_),
3781
+ )
3782
+ response.response.close()
3783
+ return response.output
3784
+
3785
+ def start_sandbox(
3786
+ self,
3787
+ *,
3788
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3789
+ project_name: Optional[
3790
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
3791
+ ] = None,
3792
+ idempotency_token: Optional[
3793
+ "capo_codebuild.types.sensitive_string.SensitiveString"
3794
+ ] = None,
3795
+ ) -> "capo_codebuild.types.start_sandbox_output.StartSandboxOutput":
3796
+ """<p>Starts a sandbox.</p>
3797
+
3798
+ Args:
3799
+ project_name: <p>The CodeBuild project name.</p>
3800
+ idempotency_token: <p>A unique client token.</p>
3801
+
3802
+ Raises:
3803
+ capo_codebuild.errors.account_suspended_exception.AccountSuspendedException: <p>The CodeBuild access has been suspended for the calling Amazon Web Services account.</p>
3804
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3805
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3806
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3807
+ """
3808
+
3809
+ def _handler(
3810
+ req: "OperationRequest[capo_codebuild.types.start_sandbox_input.StartSandboxInput]",
3811
+ ) -> OperationResponse[
3812
+ "capo_codebuild.types.start_sandbox_output.StartSandboxOutput"
3813
+ ]:
3814
+ import capo_codebuild._operations.code_build_20161006.start_sandbox
3815
+
3816
+ output, http_response = (
3817
+ capo_codebuild._operations.code_build_20161006.start_sandbox.start_sandbox(
3818
+ req.options, req.input
3819
+ )
3820
+ )
3821
+ return OperationResponse(output=output, response=http_response)
3822
+
3823
+ interceptors_, options_ = self.operation_options(config_overrides)
3824
+ input_: capo_codebuild.types.start_sandbox_input.StartSandboxInput = {}
3825
+ if project_name is not None:
3826
+ input_["project_name"] = project_name
3827
+ if idempotency_token is not None:
3828
+ input_["idempotency_token"] = idempotency_token
3829
+
3830
+ response = execute_pipeline(
3831
+ OperationRequest(input=input_, options=options_),
3832
+ handler=_handler,
3833
+ interceptors=list(interceptors_),
3834
+ )
3835
+ response.response.close()
3836
+ return response.output
3837
+
3838
+ def start_sandbox_connection(
3839
+ self,
3840
+ sandbox_id: "capo_codebuild.types.non_empty_string.NonEmptyString",
3841
+ *,
3842
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3843
+ ) -> "capo_codebuild.types.start_sandbox_connection_output.StartSandboxConnectionOutput":
3844
+ """<p>Starts a sandbox connection.</p>
3845
+
3846
+ Args:
3847
+ sandbox_id: <p>A <code>sandboxId</code> or <code>sandboxArn</code>.</p>
3848
+
3849
+ Raises:
3850
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3851
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3852
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3853
+ """
3854
+
3855
+ def _handler(
3856
+ req: "OperationRequest[capo_codebuild.types.start_sandbox_connection_input.StartSandboxConnectionInput]",
3857
+ ) -> OperationResponse[
3858
+ "capo_codebuild.types.start_sandbox_connection_output.StartSandboxConnectionOutput"
3859
+ ]:
3860
+ import capo_codebuild._operations.code_build_20161006.start_sandbox_connection
3861
+
3862
+ output, http_response = (
3863
+ capo_codebuild._operations.code_build_20161006.start_sandbox_connection.start_sandbox_connection(
3864
+ req.options, req.input
3865
+ )
3866
+ )
3867
+ return OperationResponse(output=output, response=http_response)
3868
+
3869
+ interceptors_, options_ = self.operation_options(config_overrides)
3870
+ input_: capo_codebuild.types.start_sandbox_connection_input.StartSandboxConnectionInput = {
3871
+ "sandbox_id": sandbox_id
3872
+ }
3873
+
3874
+ response = execute_pipeline(
3875
+ OperationRequest(input=input_, options=options_),
3876
+ handler=_handler,
3877
+ interceptors=list(interceptors_),
3878
+ )
3879
+ response.response.close()
3880
+ return response.output
3881
+
3882
+ def stop_build(
3883
+ self,
3884
+ id: "capo_codebuild.types.non_empty_string.NonEmptyString",
3885
+ *,
3886
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3887
+ ) -> "capo_codebuild.types.stop_build_output.StopBuildOutput":
3888
+ """<p>Attempts to stop running a build.</p>
3889
+
3890
+ Args:
3891
+ id: <p>The ID of the build.</p>
3892
+
3893
+ Raises:
3894
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3895
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3896
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3897
+ """
3898
+
3899
+ def _handler(
3900
+ req: "OperationRequest[capo_codebuild.types.stop_build_input.StopBuildInput]",
3901
+ ) -> OperationResponse[
3902
+ "capo_codebuild.types.stop_build_output.StopBuildOutput"
3903
+ ]:
3904
+ import capo_codebuild._operations.code_build_20161006.stop_build
3905
+
3906
+ output, http_response = (
3907
+ capo_codebuild._operations.code_build_20161006.stop_build.stop_build(
3908
+ req.options, req.input
3909
+ )
3910
+ )
3911
+ return OperationResponse(output=output, response=http_response)
3912
+
3913
+ interceptors_, options_ = self.operation_options(config_overrides)
3914
+ input_: capo_codebuild.types.stop_build_input.StopBuildInput = {"id": id}
3915
+
3916
+ response = execute_pipeline(
3917
+ OperationRequest(input=input_, options=options_),
3918
+ handler=_handler,
3919
+ interceptors=list(interceptors_),
3920
+ )
3921
+ response.response.close()
3922
+ return response.output
3923
+
3924
+ def stop_build_batch(
3925
+ self,
3926
+ id: "capo_codebuild.types.non_empty_string.NonEmptyString",
3927
+ *,
3928
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3929
+ ) -> "capo_codebuild.types.stop_build_batch_output.StopBuildBatchOutput":
3930
+ """<p>Stops a running batch build.</p>
3931
+
3932
+ Args:
3933
+ id: <p>The identifier of the batch build to stop.</p>
3934
+
3935
+ Raises:
3936
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3937
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3938
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3939
+ """
3940
+
3941
+ def _handler(
3942
+ req: "OperationRequest[capo_codebuild.types.stop_build_batch_input.StopBuildBatchInput]",
3943
+ ) -> OperationResponse[
3944
+ "capo_codebuild.types.stop_build_batch_output.StopBuildBatchOutput"
3945
+ ]:
3946
+ import capo_codebuild._operations.code_build_20161006.stop_build_batch
3947
+
3948
+ output, http_response = (
3949
+ capo_codebuild._operations.code_build_20161006.stop_build_batch.stop_build_batch(
3950
+ req.options, req.input
3951
+ )
3952
+ )
3953
+ return OperationResponse(output=output, response=http_response)
3954
+
3955
+ interceptors_, options_ = self.operation_options(config_overrides)
3956
+ input_: capo_codebuild.types.stop_build_batch_input.StopBuildBatchInput = {
3957
+ "id": id
3958
+ }
3959
+
3960
+ response = execute_pipeline(
3961
+ OperationRequest(input=input_, options=options_),
3962
+ handler=_handler,
3963
+ interceptors=list(interceptors_),
3964
+ )
3965
+ response.response.close()
3966
+ return response.output
3967
+
3968
+ def stop_sandbox(
3969
+ self,
3970
+ id: "capo_codebuild.types.non_empty_string.NonEmptyString",
3971
+ *,
3972
+ config_overrides: Optional[CodeBuildClientConfig] = None,
3973
+ ) -> "capo_codebuild.types.stop_sandbox_output.StopSandboxOutput":
3974
+ """<p>Stops a sandbox.</p>
3975
+
3976
+ Args:
3977
+ id: <p>Information about the requested sandbox ID.</p>
3978
+
3979
+ Raises:
3980
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
3981
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
3982
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
3983
+ """
3984
+
3985
+ def _handler(
3986
+ req: "OperationRequest[capo_codebuild.types.stop_sandbox_input.StopSandboxInput]",
3987
+ ) -> OperationResponse[
3988
+ "capo_codebuild.types.stop_sandbox_output.StopSandboxOutput"
3989
+ ]:
3990
+ import capo_codebuild._operations.code_build_20161006.stop_sandbox
3991
+
3992
+ output, http_response = (
3993
+ capo_codebuild._operations.code_build_20161006.stop_sandbox.stop_sandbox(
3994
+ req.options, req.input
3995
+ )
3996
+ )
3997
+ return OperationResponse(output=output, response=http_response)
3998
+
3999
+ interceptors_, options_ = self.operation_options(config_overrides)
4000
+ input_: capo_codebuild.types.stop_sandbox_input.StopSandboxInput = {"id": id}
4001
+
4002
+ response = execute_pipeline(
4003
+ OperationRequest(input=input_, options=options_),
4004
+ handler=_handler,
4005
+ interceptors=list(interceptors_),
4006
+ )
4007
+ response.response.close()
4008
+ return response.output
4009
+
4010
+ def update_fleet(
4011
+ self,
4012
+ arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
4013
+ *,
4014
+ config_overrides: Optional[CodeBuildClientConfig] = None,
4015
+ base_capacity: Optional[
4016
+ "capo_codebuild.types.fleet_capacity.FleetCapacity"
4017
+ ] = None,
4018
+ environment_type: Optional[
4019
+ "capo_codebuild.types.environment_type.EnvironmentType"
4020
+ ] = None,
4021
+ compute_type: Optional["capo_codebuild.types.compute_type.ComputeType"] = None,
4022
+ compute_configuration: Optional[
4023
+ "capo_codebuild.types.compute_configuration.ComputeConfiguration"
4024
+ ] = None,
4025
+ scaling_configuration: Optional[
4026
+ "capo_codebuild.types.scaling_configuration_input.ScalingConfigurationInput"
4027
+ ] = None,
4028
+ overflow_behavior: Optional[
4029
+ "capo_codebuild.types.fleet_overflow_behavior.FleetOverflowBehavior"
4030
+ ] = None,
4031
+ vpc_config: Optional["capo_codebuild.types.vpc_config.VpcConfig"] = None,
4032
+ proxy_configuration: Optional[
4033
+ "capo_codebuild.types.proxy_configuration.ProxyConfiguration"
4034
+ ] = None,
4035
+ image_id: Optional[
4036
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
4037
+ ] = None,
4038
+ fleet_service_role: Optional[
4039
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
4040
+ ] = None,
4041
+ tags: Optional["capo_codebuild.types.tag_list.TagList"] = None,
4042
+ ) -> "capo_codebuild.types.update_fleet_output.UpdateFleetOutput":
4043
+ r"""<p>Updates a compute fleet.</p>
4044
+
4045
+ Args:
4046
+ arn: <p>The ARN of the compute fleet.</p>
4047
+ base_capacity: <p>The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel.</p>
4048
+ environment_type: <p>The environment type of the compute fleet.</p> <ul> <li> <p>The environment type <code>ARM_CONTAINER</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).</p> </li> <li> <p>The environment type <code>ARM_EC2</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).</p> </li> <li> <p>The environment type <code>LINUX_CONTAINER</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).</p> </li> <li> <p>The environment type <code>LINUX_EC2</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).</p> </li> <li> <p>The environment type <code>LINUX_GPU_CONTAINER</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney).</p> </li> <li> <p>The environment type <code>MAC_ARM</code> is available for Medium fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)</p> </li> <li> <p>The environment type <code>MAC_ARM</code> is available for Large fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney).</p> </li> <li> <p>The environment type <code>WINDOWS_EC2</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).</p> </li> <li> <p>The environment type <code>WINDOWS_SERVER_2019_CONTAINER</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland).</p> </li> <li> <p>The environment type <code>WINDOWS_SERVER_2022_CONTAINER</code> is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).</p> </li> </ul> <p>For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html\">Build environment compute types</a> in the <i>CodeBuild user guide</i>.</p>
4049
+ compute_type: <p>Information about the compute resources the compute fleet uses. Available values include:</p> <ul> <li> <p> <code>ATTRIBUTE_BASED_COMPUTE</code>: Specify the amount of vCPUs, memory, disk space, and the type of machine.</p> <note> <p> If you use <code>ATTRIBUTE_BASED_COMPUTE</code>, you must define your attributes by using <code>computeConfiguration</code>. CodeBuild will select the cheapest instance that satisfies your specified attributes. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.types\">Reserved capacity environment types</a> in the <i>CodeBuild User Guide</i>.</p> </note> </li> <li> <p> <code>CUSTOM_INSTANCE_TYPE</code>: Specify the instance type for your compute fleet. For a list of supported instance types, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types\">Supported instance families </a> in the <i>CodeBuild User Guide</i>.</p> </li> <li> <p> <code>BUILD_GENERAL1_SMALL</code>: Use up to 4 GiB memory and 2 vCPUs for builds.</p> </li> <li> <p> <code>BUILD_GENERAL1_MEDIUM</code>: Use up to 8 GiB memory and 4 vCPUs for builds.</p> </li> <li> <p> <code>BUILD_GENERAL1_LARGE</code>: Use up to 16 GiB memory and 8 vCPUs for builds, depending on your environment type.</p> </li> <li> <p> <code>BUILD_GENERAL1_XLARGE</code>: Use up to 72 GiB memory and 36 vCPUs for builds, depending on your environment type.</p> </li> <li> <p> <code>BUILD_GENERAL1_2XLARGE</code>: Use up to 144 GiB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed.</p> </li> <li> <p> <code>BUILD_LAMBDA_1GB</code>: Use up to 1 GiB memory for builds. Only available for environment type <code>LINUX_LAMBDA_CONTAINER</code> and <code>ARM_LAMBDA_CONTAINER</code>.</p> </li> <li> <p> <code>BUILD_LAMBDA_2GB</code>: Use up to 2 GiB memory for builds. Only available for environment type <code>LINUX_LAMBDA_CONTAINER</code> and <code>ARM_LAMBDA_CONTAINER</code>.</p> </li> <li> <p> <code>BUILD_LAMBDA_4GB</code>: Use up to 4 GiB memory for builds. Only available for environment type <code>LINUX_LAMBDA_CONTAINER</code> and <code>ARM_LAMBDA_CONTAINER</code>.</p> </li> <li> <p> <code>BUILD_LAMBDA_8GB</code>: Use up to 8 GiB memory for builds. Only available for environment type <code>LINUX_LAMBDA_CONTAINER</code> and <code>ARM_LAMBDA_CONTAINER</code>.</p> </li> <li> <p> <code>BUILD_LAMBDA_10GB</code>: Use up to 10 GiB memory for builds. Only available for environment type <code>LINUX_LAMBDA_CONTAINER</code> and <code>ARM_LAMBDA_CONTAINER</code>.</p> </li> </ul> <p> If you use <code>BUILD_GENERAL1_SMALL</code>: </p> <ul> <li> <p> For environment type <code>LINUX_CONTAINER</code>, you can use up to 4 GiB memory and 2 vCPUs for builds. </p> </li> <li> <p> For environment type <code>LINUX_GPU_CONTAINER</code>, you can use up to 16 GiB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds.</p> </li> <li> <p> For environment type <code>ARM_CONTAINER</code>, you can use up to 4 GiB memory and 2 vCPUs on ARM-based processors for builds.</p> </li> </ul> <p> If you use <code>BUILD_GENERAL1_LARGE</code>: </p> <ul> <li> <p> For environment type <code>LINUX_CONTAINER</code>, you can use up to 16 GiB memory and 8 vCPUs for builds. </p> </li> <li> <p> For environment type <code>LINUX_GPU_CONTAINER</code>, you can use up to 255 GiB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds.</p> </li> <li> <p> For environment type <code>ARM_CONTAINER</code>, you can use up to 16 GiB memory and 8 vCPUs on ARM-based processors for builds.</p> </li> </ul> <p>For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types\">On-demand environment types</a> in the <i>CodeBuild User Guide.</i> </p>
4050
+ compute_configuration: <p>The compute configuration of the compute fleet. This is only required if <code>computeType</code> is set to <code>ATTRIBUTE_BASED_COMPUTE</code> or <code>CUSTOM_INSTANCE_TYPE</code>.</p>
4051
+ scaling_configuration: <p>The scaling configuration of the compute fleet.</p>
4052
+ overflow_behavior: <p>The compute fleet overflow behavior.</p> <ul> <li> <p>For overflow behavior <code>QUEUE</code>, your overflow builds need to wait on the existing fleet instance to become available.</p> </li> <li> <p>For overflow behavior <code>ON_DEMAND</code>, your overflow builds run on CodeBuild on-demand.</p> <note> <p>If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you add the required VPC permissions to your project service role. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-create-vpc-network-interface\">Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface</a>.</p> </note> </li> </ul>
4053
+ proxy_configuration: <p>The proxy configuration of the compute fleet.</p>
4054
+ image_id: <p>The Amazon Machine Image (AMI) of the compute fleet.</p>
4055
+ fleet_service_role: <p>The service role associated with the compute fleet. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-permission-policy-fleet-service-role.html\"> Allow a user to add a permission policy for a fleet service role</a> in the <i>CodeBuild User Guide</i>.</p>
4056
+ tags: <p>A list of tag key and value pairs associated with this compute fleet.</p> <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.</p>
4057
+
4058
+ Raises:
4059
+ capo_codebuild.errors.account_limit_exceeded_exception.AccountLimitExceededException: <p>An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.</p>
4060
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
4061
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
4062
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
4063
+ """
4064
+
4065
+ def _handler(
4066
+ req: "OperationRequest[capo_codebuild.types.update_fleet_input.UpdateFleetInput]",
4067
+ ) -> OperationResponse[
4068
+ "capo_codebuild.types.update_fleet_output.UpdateFleetOutput"
4069
+ ]:
4070
+ import capo_codebuild._operations.code_build_20161006.update_fleet
4071
+
4072
+ output, http_response = (
4073
+ capo_codebuild._operations.code_build_20161006.update_fleet.update_fleet(
4074
+ req.options, req.input
4075
+ )
4076
+ )
4077
+ return OperationResponse(output=output, response=http_response)
4078
+
4079
+ interceptors_, options_ = self.operation_options(config_overrides)
4080
+ input_: capo_codebuild.types.update_fleet_input.UpdateFleetInput = {"arn": arn}
4081
+ if base_capacity is not None:
4082
+ input_["base_capacity"] = base_capacity
4083
+ if environment_type is not None:
4084
+ input_["environment_type"] = environment_type
4085
+ if compute_type is not None:
4086
+ input_["compute_type"] = compute_type
4087
+ if compute_configuration is not None:
4088
+ input_["compute_configuration"] = compute_configuration
4089
+ if scaling_configuration is not None:
4090
+ input_["scaling_configuration"] = scaling_configuration
4091
+ if overflow_behavior is not None:
4092
+ input_["overflow_behavior"] = overflow_behavior
4093
+ if vpc_config is not None:
4094
+ input_["vpc_config"] = vpc_config
4095
+ if proxy_configuration is not None:
4096
+ input_["proxy_configuration"] = proxy_configuration
4097
+ if image_id is not None:
4098
+ input_["image_id"] = image_id
4099
+ if fleet_service_role is not None:
4100
+ input_["fleet_service_role"] = fleet_service_role
4101
+ if tags is not None:
4102
+ input_["tags"] = tags
4103
+
4104
+ response = execute_pipeline(
4105
+ OperationRequest(input=input_, options=options_),
4106
+ handler=_handler,
4107
+ interceptors=list(interceptors_),
4108
+ )
4109
+ response.response.close()
4110
+ return response.output
4111
+
4112
+ def update_project(
4113
+ self,
4114
+ name: "capo_codebuild.types.non_empty_string.NonEmptyString",
4115
+ *,
4116
+ config_overrides: Optional[CodeBuildClientConfig] = None,
4117
+ description: Optional[
4118
+ "capo_codebuild.types.project_description.ProjectDescription"
4119
+ ] = None,
4120
+ source: Optional["capo_codebuild.types.project_source.ProjectSource"] = None,
4121
+ secondary_sources: Optional[
4122
+ "capo_codebuild.types.project_sources.ProjectSources"
4123
+ ] = None,
4124
+ source_version: Optional["capo_codebuild.types.string.String"] = None,
4125
+ secondary_source_versions: Optional[
4126
+ "capo_codebuild.types.project_secondary_source_versions.ProjectSecondarySourceVersions"
4127
+ ] = None,
4128
+ artifacts: Optional[
4129
+ "capo_codebuild.types.project_artifacts.ProjectArtifacts"
4130
+ ] = None,
4131
+ secondary_artifacts: Optional[
4132
+ "capo_codebuild.types.project_artifacts_list.ProjectArtifactsList"
4133
+ ] = None,
4134
+ cache: Optional["capo_codebuild.types.project_cache.ProjectCache"] = None,
4135
+ environment: Optional[
4136
+ "capo_codebuild.types.project_environment.ProjectEnvironment"
4137
+ ] = None,
4138
+ service_role: Optional[
4139
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
4140
+ ] = None,
4141
+ timeout_in_minutes: Optional[
4142
+ "capo_codebuild.types.build_time_out.BuildTimeOut"
4143
+ ] = None,
4144
+ queued_timeout_in_minutes: Optional[
4145
+ "capo_codebuild.types.time_out.TimeOut"
4146
+ ] = None,
4147
+ encryption_key: Optional[
4148
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
4149
+ ] = None,
4150
+ tags: Optional["capo_codebuild.types.tag_list.TagList"] = None,
4151
+ vpc_config: Optional["capo_codebuild.types.vpc_config.VpcConfig"] = None,
4152
+ badge_enabled: Optional[
4153
+ "capo_codebuild.types.wrapper_boolean.WrapperBoolean"
4154
+ ] = None,
4155
+ logs_config: Optional["capo_codebuild.types.logs_config.LogsConfig"] = None,
4156
+ file_system_locations: Optional[
4157
+ "capo_codebuild.types.project_file_system_locations.ProjectFileSystemLocations"
4158
+ ] = None,
4159
+ build_batch_config: Optional[
4160
+ "capo_codebuild.types.project_build_batch_config.ProjectBuildBatchConfig"
4161
+ ] = None,
4162
+ concurrent_build_limit: Optional[
4163
+ "capo_codebuild.types.wrapper_int.WrapperInt"
4164
+ ] = None,
4165
+ auto_retry_limit: Optional[
4166
+ "capo_codebuild.types.wrapper_int.WrapperInt"
4167
+ ] = None,
4168
+ ) -> "capo_codebuild.types.update_project_output.UpdateProjectOutput":
4169
+ r"""<p>Changes the settings of a build project.</p>
4170
+
4171
+ Args:
4172
+ name: <p>The name of the build project.</p> <note> <p>You cannot change a build project's name.</p> </note>
4173
+ description: <p>A new or replacement description of the build project.</p>
4174
+ source: <p>Information to be changed about the build input source code for the build project.</p>
4175
+ secondary_sources: <p> An array of <code>ProjectSource</code> objects. </p>
4176
+ source_version: <p> A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of: </p> <ul> <li> <p>For CodeCommit: the commit ID, branch, or Git tag to use.</p> </li> <li> <p>For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p> </li> <li> <p>For GitLab: the commit ID, branch, or Git tag to use.</p> </li> <li> <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p> </li> <li> <p>For Amazon S3: the version ID of the object that represents the build input ZIP file to use.</p> </li> </ul> <p> If <code>sourceVersion</code> is specified at the build level, then that version takes precedence over this <code>sourceVersion</code> (at the project level). </p> <p> For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html\">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>. </p>
4177
+ secondary_source_versions: <p> An array of <code>ProjectSourceVersion</code> objects. If <code>secondarySourceVersions</code> is specified at the build level, then they take over these <code>secondarySourceVersions</code> (at the project level). </p>
4178
+ artifacts: <p>Information to be changed about the build output artifacts for the build project.</p>
4179
+ secondary_artifacts: <p> An array of <code>ProjectArtifact</code> objects. </p>
4180
+ cache: <p>Stores recently used information so that it can be quickly accessed at a later time.</p>
4181
+ environment: <p>Information to be changed about the build environment for the build project.</p>
4182
+ service_role: <p>The replacement ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.</p>
4183
+ timeout_in_minutes: <p>The replacement value in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing out any related build that did not get marked as completed.</p>
4184
+ queued_timeout_in_minutes: <p> The number of minutes a build is allowed to be queued before it times out. </p>
4185
+ encryption_key: <p>The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.</p> <note> <p> You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key. </p> </note> <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/<alias-name></code>). </p>
4186
+ tags: <p>An updated list of tag key and value pairs associated with this build project.</p> <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.</p>
4187
+ vpc_config: <p>VpcConfig enables CodeBuild to access resources in an Amazon VPC.</p>
4188
+ badge_enabled: <p>Set this to true to generate a publicly accessible URL for your project's build badge.</p>
4189
+ logs_config: <p> Information about logs for the build project. A project can create logs in CloudWatch Logs, logs in an S3 bucket, or both. </p>
4190
+ file_system_locations: <p> An array of <code>ProjectFileSystemLocation</code> objects for a CodeBuild build project. A <code>ProjectFileSystemLocation</code> object specifies the <code>identifier</code>, <code>location</code>, <code>mountOptions</code>, <code>mountPoint</code>, and <code>type</code> of a file system created using Amazon Elastic File System. </p>
4191
+ concurrent_build_limit: <p>The maximum number of concurrent builds that are allowed for this project.</p> <p>New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.</p> <p>To remove this limit, set this value to -1.</p>
4192
+ auto_retry_limit: <p>The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically retry your build for up to 2 additional times.</p>
4193
+
4194
+ Raises:
4195
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
4196
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
4197
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
4198
+ """
4199
+
4200
+ def _handler(
4201
+ req: "OperationRequest[capo_codebuild.types.update_project_input.UpdateProjectInput]",
4202
+ ) -> OperationResponse[
4203
+ "capo_codebuild.types.update_project_output.UpdateProjectOutput"
4204
+ ]:
4205
+ import capo_codebuild._operations.code_build_20161006.update_project
4206
+
4207
+ output, http_response = (
4208
+ capo_codebuild._operations.code_build_20161006.update_project.update_project(
4209
+ req.options, req.input
4210
+ )
4211
+ )
4212
+ return OperationResponse(output=output, response=http_response)
4213
+
4214
+ interceptors_, options_ = self.operation_options(config_overrides)
4215
+ input_: capo_codebuild.types.update_project_input.UpdateProjectInput = {
4216
+ "name": name
4217
+ }
4218
+ if description is not None:
4219
+ input_["description"] = description
4220
+ if source is not None:
4221
+ input_["source"] = source
4222
+ if secondary_sources is not None:
4223
+ input_["secondary_sources"] = secondary_sources
4224
+ if source_version is not None:
4225
+ input_["source_version"] = source_version
4226
+ if secondary_source_versions is not None:
4227
+ input_["secondary_source_versions"] = secondary_source_versions
4228
+ if artifacts is not None:
4229
+ input_["artifacts"] = artifacts
4230
+ if secondary_artifacts is not None:
4231
+ input_["secondary_artifacts"] = secondary_artifacts
4232
+ if cache is not None:
4233
+ input_["cache"] = cache
4234
+ if environment is not None:
4235
+ input_["environment"] = environment
4236
+ if service_role is not None:
4237
+ input_["service_role"] = service_role
4238
+ if timeout_in_minutes is not None:
4239
+ input_["timeout_in_minutes"] = timeout_in_minutes
4240
+ if queued_timeout_in_minutes is not None:
4241
+ input_["queued_timeout_in_minutes"] = queued_timeout_in_minutes
4242
+ if encryption_key is not None:
4243
+ input_["encryption_key"] = encryption_key
4244
+ if tags is not None:
4245
+ input_["tags"] = tags
4246
+ if vpc_config is not None:
4247
+ input_["vpc_config"] = vpc_config
4248
+ if badge_enabled is not None:
4249
+ input_["badge_enabled"] = badge_enabled
4250
+ if logs_config is not None:
4251
+ input_["logs_config"] = logs_config
4252
+ if file_system_locations is not None:
4253
+ input_["file_system_locations"] = file_system_locations
4254
+ if build_batch_config is not None:
4255
+ input_["build_batch_config"] = build_batch_config
4256
+ if concurrent_build_limit is not None:
4257
+ input_["concurrent_build_limit"] = concurrent_build_limit
4258
+ if auto_retry_limit is not None:
4259
+ input_["auto_retry_limit"] = auto_retry_limit
4260
+
4261
+ response = execute_pipeline(
4262
+ OperationRequest(input=input_, options=options_),
4263
+ handler=_handler,
4264
+ interceptors=list(interceptors_),
4265
+ )
4266
+ response.response.close()
4267
+ return response.output
4268
+
4269
+ def update_project_visibility(
4270
+ self,
4271
+ project_arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
4272
+ project_visibility: "capo_codebuild.types.project_visibility_type.ProjectVisibilityType",
4273
+ *,
4274
+ config_overrides: Optional[CodeBuildClientConfig] = None,
4275
+ resource_access_role: Optional[
4276
+ "capo_codebuild.types.non_empty_string.NonEmptyString"
4277
+ ] = None,
4278
+ ) -> "capo_codebuild.types.update_project_visibility_output.UpdateProjectVisibilityOutput":
4279
+ r"""<p>Changes the public visibility for a project. The project's build results, logs, and artifacts are available to the general public. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/public-builds.html\">Public build projects</a> in the <i>CodeBuild User Guide</i>.</p> <important> <p>The following should be kept in mind when making your projects public:</p> <ul> <li> <p>All of a project's build results, logs, and artifacts, including builds that were run when the project was private, are available to the general public.</p> </li> <li> <p>All build logs and artifacts are available to the public. Environment variables, source code, and other sensitive information may have been output to the build logs and artifacts. You must be careful about what information is output to the build logs. Some best practice are:</p> <ul> <li> <p>Do not store sensitive values in environment variables. We recommend that you use an Amazon EC2 Systems Manager Parameter Store or Secrets Manager to store sensitive values.</p> </li> <li> <p>Follow <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/webhooks.html#webhook-best-practices\">Best practices for using webhooks</a> in the <i>CodeBuild User Guide</i> to limit which entities can trigger a build, and do not store the buildspec in the project itself, to ensure that your webhooks are as secure as possible.</p> </li> </ul> </li> <li> <p>A malicious user can use public builds to distribute malicious artifacts. We recommend that you review all pull requests to verify that the pull request is a legitimate change. We also recommend that you validate any artifacts with their checksums to make sure that the correct artifacts are being downloaded.</p> </li> </ul> </important>
4280
+
4281
+ Args:
4282
+ project_arn: <p>The Amazon Resource Name (ARN) of the build project.</p>
4283
+ resource_access_role: <p>The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.</p>
4284
+
4285
+ Raises:
4286
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
4287
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
4288
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
4289
+ """
4290
+
4291
+ def _handler(
4292
+ req: "OperationRequest[capo_codebuild.types.update_project_visibility_input.UpdateProjectVisibilityInput]",
4293
+ ) -> OperationResponse[
4294
+ "capo_codebuild.types.update_project_visibility_output.UpdateProjectVisibilityOutput"
4295
+ ]:
4296
+ import capo_codebuild._operations.code_build_20161006.update_project_visibility
4297
+
4298
+ output, http_response = (
4299
+ capo_codebuild._operations.code_build_20161006.update_project_visibility.update_project_visibility(
4300
+ req.options, req.input
4301
+ )
4302
+ )
4303
+ return OperationResponse(output=output, response=http_response)
4304
+
4305
+ interceptors_, options_ = self.operation_options(config_overrides)
4306
+ input_: capo_codebuild.types.update_project_visibility_input.UpdateProjectVisibilityInput = {
4307
+ "project_arn": project_arn,
4308
+ "project_visibility": project_visibility,
4309
+ }
4310
+ if resource_access_role is not None:
4311
+ input_["resource_access_role"] = resource_access_role
4312
+
4313
+ response = execute_pipeline(
4314
+ OperationRequest(input=input_, options=options_),
4315
+ handler=_handler,
4316
+ interceptors=list(interceptors_),
4317
+ )
4318
+ response.response.close()
4319
+ return response.output
4320
+
4321
+ def update_report_group(
4322
+ self,
4323
+ arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
4324
+ *,
4325
+ config_overrides: Optional[CodeBuildClientConfig] = None,
4326
+ export_config: Optional[
4327
+ "capo_codebuild.types.report_export_config.ReportExportConfig"
4328
+ ] = None,
4329
+ tags: Optional["capo_codebuild.types.tag_list.TagList"] = None,
4330
+ ) -> "capo_codebuild.types.update_report_group_output.UpdateReportGroupOutput":
4331
+ """<p> Updates a report group. </p>
4332
+
4333
+ Args:
4334
+ arn: <p> The ARN of the report group to update. </p>
4335
+ export_config: <p> Used to specify an updated export type. Valid values are: </p> <ul> <li> <p> <code>S3</code>: The report results are exported to an S3 bucket. </p> </li> <li> <p> <code>NO_EXPORT</code>: The report results are not exported. </p> </li> </ul>
4336
+ tags: <p> An updated list of tag key and value pairs associated with this report group. </p> <p>These tags are available for use by Amazon Web Services services that support CodeBuild report group tags.</p>
4337
+
4338
+ Raises:
4339
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
4340
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
4341
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
4342
+ """
4343
+
4344
+ def _handler(
4345
+ req: "OperationRequest[capo_codebuild.types.update_report_group_input.UpdateReportGroupInput]",
4346
+ ) -> OperationResponse[
4347
+ "capo_codebuild.types.update_report_group_output.UpdateReportGroupOutput"
4348
+ ]:
4349
+ import capo_codebuild._operations.code_build_20161006.update_report_group
4350
+
4351
+ output, http_response = (
4352
+ capo_codebuild._operations.code_build_20161006.update_report_group.update_report_group(
4353
+ req.options, req.input
4354
+ )
4355
+ )
4356
+ return OperationResponse(output=output, response=http_response)
4357
+
4358
+ interceptors_, options_ = self.operation_options(config_overrides)
4359
+ input_: capo_codebuild.types.update_report_group_input.UpdateReportGroupInput = {
4360
+ "arn": arn
4361
+ }
4362
+ if export_config is not None:
4363
+ input_["export_config"] = export_config
4364
+ if tags is not None:
4365
+ input_["tags"] = tags
4366
+
4367
+ response = execute_pipeline(
4368
+ OperationRequest(input=input_, options=options_),
4369
+ handler=_handler,
4370
+ interceptors=list(interceptors_),
4371
+ )
4372
+ response.response.close()
4373
+ return response.output
4374
+
4375
+ def update_webhook(
4376
+ self,
4377
+ project_name: "capo_codebuild.types.project_name.ProjectName",
4378
+ *,
4379
+ config_overrides: Optional[CodeBuildClientConfig] = None,
4380
+ branch_filter: Optional["capo_codebuild.types.string.String"] = None,
4381
+ rotate_secret: Optional["capo_codebuild.types.boolean.Boolean"] = None,
4382
+ filter_groups: Optional[
4383
+ "capo_codebuild.types.filter_groups.FilterGroups"
4384
+ ] = None,
4385
+ build_type: Optional[
4386
+ "capo_codebuild.types.webhook_build_type.WebhookBuildType"
4387
+ ] = None,
4388
+ pull_request_build_policy: Optional[
4389
+ "capo_codebuild.types.pull_request_build_policy.PullRequestBuildPolicy"
4390
+ ] = None,
4391
+ ) -> "capo_codebuild.types.update_webhook_output.UpdateWebhookOutput":
4392
+ r"""<p> Updates the webhook associated with an CodeBuild build project. </p> <note> <p> If you use Bitbucket for your repository, <code>rotateSecret</code> is ignored. </p> </note>
4393
+
4394
+ Args:
4395
+ project_name: <p>The name of the CodeBuild project.</p>
4396
+ branch_filter: <p>A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If <code>branchFilter</code> is empty, then all branches are built.</p> <note> <p> It is recommended that you use <code>filterGroups</code> instead of <code>branchFilter</code>. </p> </note>
4397
+ rotate_secret: <p> A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you use Bitbucket for your repository, <code>rotateSecret</code> is ignored. </p>
4398
+ filter_groups: <p> An array of arrays of <code>WebhookFilter</code> objects used to determine if a webhook event can trigger a build. A filter group must contain at least one <code>EVENT</code> <code>WebhookFilter</code>. </p>
4399
+ build_type: <p>Specifies the type of build this webhook will trigger.</p> <note> <p> <code>RUNNER_BUILDKITE_BUILD</code> is only available for <code>NO_SOURCE</code> source type projects configured for Buildkite runner builds. For more information about CodeBuild-hosted Buildkite runner builds, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/sample-runner-buildkite.html\">Tutorial: Configure a CodeBuild-hosted Buildkite runner</a> in the <i>CodeBuild user guide</i>.</p> </note>
4400
+ pull_request_build_policy: <p>A PullRequestBuildPolicy object that defines comment-based approval requirements for triggering builds on pull requests. This policy helps control when automated builds are executed based on contributor permissions and approval workflows.</p>
4401
+
4402
+ Raises:
4403
+ capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
4404
+ capo_codebuild.errors.o_auth_provider_exception.OAuthProviderException: <p>There was a problem with the underlying OAuth provider.</p>
4405
+ capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
4406
+ capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
4407
+ """
4408
+
4409
+ def _handler(
4410
+ req: "OperationRequest[capo_codebuild.types.update_webhook_input.UpdateWebhookInput]",
4411
+ ) -> OperationResponse[
4412
+ "capo_codebuild.types.update_webhook_output.UpdateWebhookOutput"
4413
+ ]:
4414
+ import capo_codebuild._operations.code_build_20161006.update_webhook
4415
+
4416
+ output, http_response = (
4417
+ capo_codebuild._operations.code_build_20161006.update_webhook.update_webhook(
4418
+ req.options, req.input
4419
+ )
4420
+ )
4421
+ return OperationResponse(output=output, response=http_response)
4422
+
4423
+ interceptors_, options_ = self.operation_options(config_overrides)
4424
+ input_: capo_codebuild.types.update_webhook_input.UpdateWebhookInput = {
4425
+ "project_name": project_name
4426
+ }
4427
+ if branch_filter is not None:
4428
+ input_["branch_filter"] = branch_filter
4429
+ if rotate_secret is not None:
4430
+ input_["rotate_secret"] = rotate_secret
4431
+ if filter_groups is not None:
4432
+ input_["filter_groups"] = filter_groups
4433
+ if build_type is not None:
4434
+ input_["build_type"] = build_type
4435
+ if pull_request_build_policy is not None:
4436
+ input_["pull_request_build_policy"] = pull_request_build_policy
4437
+
4438
+ response = execute_pipeline(
4439
+ OperationRequest(input=input_, options=options_),
4440
+ handler=_handler,
4441
+ interceptors=list(interceptors_),
4442
+ )
4443
+ response.response.close()
4444
+ return response.output
4445
+
4446
+ def __enter__(self) -> Self:
4447
+ return self
4448
+
4449
+ def __exit__(self, exc_type: Any, exc: Any, tb: Any):
4450
+ self._client.close()