capo-codedeploy 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 (472) hide show
  1. capo_codedeploy/__init__.py +70 -0
  2. capo_codedeploy/_async.py +25 -0
  3. capo_codedeploy/_auth/_identity.py +16 -0
  4. capo_codedeploy/_auth/_providers.py +886 -0
  5. capo_codedeploy/_auth/_signers.py +88 -0
  6. capo_codedeploy/_auth/_sigv4.py +434 -0
  7. capo_codedeploy/_auth/_zapros_handler.py +80 -0
  8. capo_codedeploy/_iter.py +113 -0
  9. capo_codedeploy/_operations/code_deploy_20141006/add_tags_to_on_premises_instances.py +153 -0
  10. capo_codedeploy/_operations/code_deploy_20141006/batch_get_application_revisions.py +173 -0
  11. capo_codedeploy/_operations/code_deploy_20141006/batch_get_applications.py +163 -0
  12. capo_codedeploy/_operations/code_deploy_20141006/batch_get_deployment_groups.py +178 -0
  13. capo_codedeploy/_operations/code_deploy_20141006/batch_get_deployment_instances.py +178 -0
  14. capo_codedeploy/_operations/code_deploy_20141006/batch_get_deployment_targets.py +188 -0
  15. capo_codedeploy/_operations/code_deploy_20141006/batch_get_deployments.py +158 -0
  16. capo_codedeploy/_operations/code_deploy_20141006/batch_get_on_premises_instances.py +158 -0
  17. capo_codedeploy/_operations/code_deploy_20141006/continue_deployment.py +155 -0
  18. capo_codedeploy/_operations/code_deploy_20141006/create_application.py +175 -0
  19. capo_codedeploy/_operations/code_deploy_20141006/create_deployment.py +278 -0
  20. capo_codedeploy/_operations/code_deploy_20141006/create_deployment_config.py +185 -0
  21. capo_codedeploy/_operations/code_deploy_20141006/create_deployment_group.py +320 -0
  22. capo_codedeploy/_operations/code_deploy_20141006/delete_application.py +129 -0
  23. capo_codedeploy/_operations/code_deploy_20141006/delete_deployment_config.py +136 -0
  24. capo_codedeploy/_operations/code_deploy_20141006/delete_deployment_group.py +167 -0
  25. capo_codedeploy/_operations/code_deploy_20141006/delete_git_hub_account_token.py +166 -0
  26. capo_codedeploy/_operations/code_deploy_20141006/delete_resources_by_external_id.py +137 -0
  27. capo_codedeploy/_operations/code_deploy_20141006/deregister_on_premises_instance.py +126 -0
  28. capo_codedeploy/_operations/code_deploy_20141006/get_application.py +157 -0
  29. capo_codedeploy/_operations/code_deploy_20141006/get_application_revision.py +173 -0
  30. capo_codedeploy/_operations/code_deploy_20141006/get_deployment.py +157 -0
  31. capo_codedeploy/_operations/code_deploy_20141006/get_deployment_config.py +162 -0
  32. capo_codedeploy/_operations/code_deploy_20141006/get_deployment_group.py +179 -0
  33. capo_codedeploy/_operations/code_deploy_20141006/get_deployment_instance.py +177 -0
  34. capo_codedeploy/_operations/code_deploy_20141006/get_deployment_target.py +182 -0
  35. capo_codedeploy/_operations/code_deploy_20141006/get_on_premises_instance.py +157 -0
  36. capo_codedeploy/_operations/code_deploy_20141006/list_application_revisions.py +195 -0
  37. capo_codedeploy/_operations/code_deploy_20141006/list_applications.py +149 -0
  38. capo_codedeploy/_operations/code_deploy_20141006/list_deployment_configs.py +147 -0
  39. capo_codedeploy/_operations/code_deploy_20141006/list_deployment_groups.py +162 -0
  40. capo_codedeploy/_operations/code_deploy_20141006/list_deployment_instances.py +198 -0
  41. capo_codedeploy/_operations/code_deploy_20141006/list_deployment_targets.py +188 -0
  42. capo_codedeploy/_operations/code_deploy_20141006/list_deployments.py +199 -0
  43. capo_codedeploy/_operations/code_deploy_20141006/list_git_hub_account_token_names.py +157 -0
  44. capo_codedeploy/_operations/code_deploy_20141006/list_on_premises_instances.py +159 -0
  45. capo_codedeploy/_operations/code_deploy_20141006/list_tags_for_resource.py +157 -0
  46. capo_codedeploy/_operations/code_deploy_20141006/put_lifecycle_event_hook_execution_status.py +177 -0
  47. capo_codedeploy/_operations/code_deploy_20141006/register_application_revision.py +147 -0
  48. capo_codedeploy/_operations/code_deploy_20141006/register_on_premises_instance.py +166 -0
  49. capo_codedeploy/_operations/code_deploy_20141006/remove_tags_from_on_premises_instances.py +153 -0
  50. capo_codedeploy/_operations/code_deploy_20141006/skip_wait_time_for_instance_termination.py +146 -0
  51. capo_codedeploy/_operations/code_deploy_20141006/stop_deployment.py +172 -0
  52. capo_codedeploy/_operations/code_deploy_20141006/tag_resource.py +174 -0
  53. capo_codedeploy/_operations/code_deploy_20141006/untag_resource.py +174 -0
  54. capo_codedeploy/_operations/code_deploy_20141006/update_application.py +134 -0
  55. capo_codedeploy/_operations/code_deploy_20141006/update_deployment_group.py +310 -0
  56. capo_codedeploy/_pagination.py +21 -0
  57. capo_codedeploy/_protocol/__init__.py +1 -0
  58. capo_codedeploy/_protocol/errors.py +93 -0
  59. capo_codedeploy/_protocol/eventstream.py +238 -0
  60. capo_codedeploy/_protocol/serialize.py +47 -0
  61. capo_codedeploy/_protocol/xml.py +33 -0
  62. capo_codedeploy/_rule_engine/__init__.py +0 -0
  63. capo_codedeploy/_rule_engine/_aws_partition.py +160 -0
  64. capo_codedeploy/_rule_engine/_endpoint_rule_set.py +138 -0
  65. capo_codedeploy/_rule_engine/_endpoint_runtime.py +389 -0
  66. capo_codedeploy/_services/_aws_config.py +160 -0
  67. capo_codedeploy/_services/_pipeline.py +198 -0
  68. capo_codedeploy/_services/async_code_deploy.py +3278 -0
  69. capo_codedeploy/_services/code_deploy.py +3229 -0
  70. capo_codedeploy/errors/__init__.py +335 -0
  71. capo_codedeploy/errors/_base.py +94 -0
  72. capo_codedeploy/errors/alarms_limit_exceeded_exception.py +52 -0
  73. capo_codedeploy/errors/application_already_exists_exception.py +54 -0
  74. capo_codedeploy/errors/application_does_not_exist_exception.py +54 -0
  75. capo_codedeploy/errors/application_limit_exceeded_exception.py +54 -0
  76. capo_codedeploy/errors/application_name_required_exception.py +54 -0
  77. capo_codedeploy/errors/arn_not_supported_exception.py +52 -0
  78. capo_codedeploy/errors/batch_limit_exceeded_exception.py +52 -0
  79. capo_codedeploy/errors/bucket_name_filter_required_exception.py +54 -0
  80. capo_codedeploy/errors/deployment_already_completed_exception.py +54 -0
  81. capo_codedeploy/errors/deployment_config_already_exists_exception.py +54 -0
  82. capo_codedeploy/errors/deployment_config_does_not_exist_exception.py +54 -0
  83. capo_codedeploy/errors/deployment_config_in_use_exception.py +54 -0
  84. capo_codedeploy/errors/deployment_config_limit_exceeded_exception.py +54 -0
  85. capo_codedeploy/errors/deployment_config_name_required_exception.py +54 -0
  86. capo_codedeploy/errors/deployment_does_not_exist_exception.py +54 -0
  87. capo_codedeploy/errors/deployment_group_already_exists_exception.py +54 -0
  88. capo_codedeploy/errors/deployment_group_does_not_exist_exception.py +54 -0
  89. capo_codedeploy/errors/deployment_group_limit_exceeded_exception.py +54 -0
  90. capo_codedeploy/errors/deployment_group_name_required_exception.py +54 -0
  91. capo_codedeploy/errors/deployment_id_required_exception.py +54 -0
  92. capo_codedeploy/errors/deployment_is_not_in_ready_state_exception.py +54 -0
  93. capo_codedeploy/errors/deployment_limit_exceeded_exception.py +54 -0
  94. capo_codedeploy/errors/deployment_not_started_exception.py +54 -0
  95. capo_codedeploy/errors/deployment_target_does_not_exist_exception.py +54 -0
  96. capo_codedeploy/errors/deployment_target_id_required_exception.py +54 -0
  97. capo_codedeploy/errors/deployment_target_list_size_exceeded_exception.py +56 -0
  98. capo_codedeploy/errors/description_too_long_exception.py +52 -0
  99. capo_codedeploy/errors/ecs_service_mapping_limit_exceeded_exception.py +54 -0
  100. capo_codedeploy/errors/git_hub_account_token_does_not_exist_exception.py +54 -0
  101. capo_codedeploy/errors/git_hub_account_token_name_required_exception.py +54 -0
  102. capo_codedeploy/errors/iam_arn_required_exception.py +52 -0
  103. capo_codedeploy/errors/iam_session_arn_already_registered_exception.py +54 -0
  104. capo_codedeploy/errors/iam_user_arn_already_registered_exception.py +54 -0
  105. capo_codedeploy/errors/iam_user_arn_required_exception.py +52 -0
  106. capo_codedeploy/errors/instance_does_not_exist_exception.py +54 -0
  107. capo_codedeploy/errors/instance_id_required_exception.py +52 -0
  108. capo_codedeploy/errors/instance_limit_exceeded_exception.py +54 -0
  109. capo_codedeploy/errors/instance_name_already_registered_exception.py +54 -0
  110. capo_codedeploy/errors/instance_name_required_exception.py +54 -0
  111. capo_codedeploy/errors/instance_not_registered_exception.py +54 -0
  112. capo_codedeploy/errors/invalid_alarm_config_exception.py +52 -0
  113. capo_codedeploy/errors/invalid_application_name_exception.py +54 -0
  114. capo_codedeploy/errors/invalid_arn_exception.py +52 -0
  115. capo_codedeploy/errors/invalid_auto_rollback_config_exception.py +54 -0
  116. capo_codedeploy/errors/invalid_auto_scaling_group_exception.py +54 -0
  117. capo_codedeploy/errors/invalid_blue_green_deployment_configuration_exception.py +60 -0
  118. capo_codedeploy/errors/invalid_bucket_name_filter_exception.py +54 -0
  119. capo_codedeploy/errors/invalid_compute_platform_exception.py +54 -0
  120. capo_codedeploy/errors/invalid_deployed_state_filter_exception.py +54 -0
  121. capo_codedeploy/errors/invalid_deployment_config_name_exception.py +54 -0
  122. capo_codedeploy/errors/invalid_deployment_group_name_exception.py +54 -0
  123. capo_codedeploy/errors/invalid_deployment_id_exception.py +52 -0
  124. capo_codedeploy/errors/invalid_deployment_instance_type_exception.py +54 -0
  125. capo_codedeploy/errors/invalid_deployment_status_exception.py +54 -0
  126. capo_codedeploy/errors/invalid_deployment_style_exception.py +54 -0
  127. capo_codedeploy/errors/invalid_deployment_target_id_exception.py +54 -0
  128. capo_codedeploy/errors/invalid_deployment_wait_type_exception.py +54 -0
  129. capo_codedeploy/errors/invalid_ec2_tag_combination_exception.py +54 -0
  130. capo_codedeploy/errors/invalid_ec2_tag_exception.py +52 -0
  131. capo_codedeploy/errors/invalid_ecs_service_exception.py +52 -0
  132. capo_codedeploy/errors/invalid_external_id_exception.py +52 -0
  133. capo_codedeploy/errors/invalid_file_exists_behavior_exception.py +54 -0
  134. capo_codedeploy/errors/invalid_git_hub_account_token_exception.py +54 -0
  135. capo_codedeploy/errors/invalid_git_hub_account_token_name_exception.py +54 -0
  136. capo_codedeploy/errors/invalid_iam_session_arn_exception.py +54 -0
  137. capo_codedeploy/errors/invalid_iam_user_arn_exception.py +52 -0
  138. capo_codedeploy/errors/invalid_ignore_application_stop_failures_value_exception.py +60 -0
  139. capo_codedeploy/errors/invalid_input_exception.py +52 -0
  140. capo_codedeploy/errors/invalid_instance_name_exception.py +52 -0
  141. capo_codedeploy/errors/invalid_instance_status_exception.py +54 -0
  142. capo_codedeploy/errors/invalid_instance_type_exception.py +52 -0
  143. capo_codedeploy/errors/invalid_key_prefix_filter_exception.py +54 -0
  144. capo_codedeploy/errors/invalid_lifecycle_event_hook_execution_id_exception.py +60 -0
  145. capo_codedeploy/errors/invalid_lifecycle_event_hook_execution_status_exception.py +60 -0
  146. capo_codedeploy/errors/invalid_load_balancer_info_exception.py +54 -0
  147. capo_codedeploy/errors/invalid_minimum_healthy_host_value_exception.py +54 -0
  148. capo_codedeploy/errors/invalid_next_token_exception.py +52 -0
  149. capo_codedeploy/errors/invalid_on_premises_tag_combination_exception.py +56 -0
  150. capo_codedeploy/errors/invalid_operation_exception.py +52 -0
  151. capo_codedeploy/errors/invalid_registration_status_exception.py +54 -0
  152. capo_codedeploy/errors/invalid_revision_exception.py +52 -0
  153. capo_codedeploy/errors/invalid_role_exception.py +52 -0
  154. capo_codedeploy/errors/invalid_sort_by_exception.py +52 -0
  155. capo_codedeploy/errors/invalid_sort_order_exception.py +52 -0
  156. capo_codedeploy/errors/invalid_tag_exception.py +52 -0
  157. capo_codedeploy/errors/invalid_tag_filter_exception.py +52 -0
  158. capo_codedeploy/errors/invalid_tags_to_add_exception.py +52 -0
  159. capo_codedeploy/errors/invalid_target_filter_name_exception.py +54 -0
  160. capo_codedeploy/errors/invalid_target_group_pair_exception.py +54 -0
  161. capo_codedeploy/errors/invalid_target_instances_exception.py +54 -0
  162. capo_codedeploy/errors/invalid_time_range_exception.py +52 -0
  163. capo_codedeploy/errors/invalid_traffic_routing_configuration_exception.py +58 -0
  164. capo_codedeploy/errors/invalid_trigger_config_exception.py +54 -0
  165. capo_codedeploy/errors/invalid_update_outdated_instances_only_value_exception.py +60 -0
  166. capo_codedeploy/errors/invalid_zonal_deployment_configuration_exception.py +60 -0
  167. capo_codedeploy/errors/lifecycle_event_already_completed_exception.py +54 -0
  168. capo_codedeploy/errors/lifecycle_hook_limit_exceeded_exception.py +54 -0
  169. capo_codedeploy/errors/multiple_iam_arns_provided_exception.py +54 -0
  170. capo_codedeploy/errors/operation_not_supported_exception.py +54 -0
  171. capo_codedeploy/errors/resource_arn_required_exception.py +52 -0
  172. capo_codedeploy/errors/resource_validation_exception.py +52 -0
  173. capo_codedeploy/errors/revision_does_not_exist_exception.py +54 -0
  174. capo_codedeploy/errors/revision_required_exception.py +52 -0
  175. capo_codedeploy/errors/role_required_exception.py +52 -0
  176. capo_codedeploy/errors/tag_limit_exceeded_exception.py +52 -0
  177. capo_codedeploy/errors/tag_required_exception.py +52 -0
  178. capo_codedeploy/errors/tag_set_list_limit_exceeded_exception.py +54 -0
  179. capo_codedeploy/errors/throttling_exception.py +52 -0
  180. capo_codedeploy/errors/trigger_targets_limit_exceeded_exception.py +54 -0
  181. capo_codedeploy/errors/unsupported_action_for_deployment_type_exception.py +58 -0
  182. capo_codedeploy/py.typed +0 -0
  183. capo_codedeploy/types/_prelude/blob.py +12 -0
  184. capo_codedeploy/types/_prelude/timestamp.py +17 -0
  185. capo_codedeploy/types/add_tags_to_on_premises_instances_input.py +59 -0
  186. capo_codedeploy/types/additional_deployment_status_info.py +5 -0
  187. capo_codedeploy/types/alarm.py +28 -0
  188. capo_codedeploy/types/alarm_configuration.py +51 -0
  189. capo_codedeploy/types/alarm_list.py +29 -0
  190. capo_codedeploy/types/alarm_name.py +5 -0
  191. capo_codedeploy/types/app_spec_content.py +35 -0
  192. capo_codedeploy/types/application_id.py +5 -0
  193. capo_codedeploy/types/application_info.py +90 -0
  194. capo_codedeploy/types/application_name.py +5 -0
  195. capo_codedeploy/types/application_revision_sort_by.py +18 -0
  196. capo_codedeploy/types/applications_info_list.py +33 -0
  197. capo_codedeploy/types/applications_list.py +19 -0
  198. capo_codedeploy/types/arn.py +5 -0
  199. capo_codedeploy/types/auto_rollback_configuration.py +50 -0
  200. capo_codedeploy/types/auto_rollback_event.py +18 -0
  201. capo_codedeploy/types/auto_rollback_events_list.py +35 -0
  202. capo_codedeploy/types/auto_scaling_group.py +47 -0
  203. capo_codedeploy/types/auto_scaling_group_hook.py +5 -0
  204. capo_codedeploy/types/auto_scaling_group_list.py +35 -0
  205. capo_codedeploy/types/auto_scaling_group_name.py +5 -0
  206. capo_codedeploy/types/auto_scaling_group_name_list.py +19 -0
  207. capo_codedeploy/types/batch_get_application_revisions_input.py +55 -0
  208. capo_codedeploy/types/batch_get_application_revisions_output.py +56 -0
  209. capo_codedeploy/types/batch_get_applications_input.py +45 -0
  210. capo_codedeploy/types/batch_get_applications_output.py +42 -0
  211. capo_codedeploy/types/batch_get_deployment_groups_input.py +57 -0
  212. capo_codedeploy/types/batch_get_deployment_groups_output.py +49 -0
  213. capo_codedeploy/types/batch_get_deployment_instances_input.py +53 -0
  214. capo_codedeploy/types/batch_get_deployment_instances_output.py +49 -0
  215. capo_codedeploy/types/batch_get_deployment_targets_input.py +51 -0
  216. capo_codedeploy/types/batch_get_deployment_targets_output.py +42 -0
  217. capo_codedeploy/types/batch_get_deployments_input.py +43 -0
  218. capo_codedeploy/types/batch_get_deployments_output.py +42 -0
  219. capo_codedeploy/types/batch_get_on_premises_instances_input.py +45 -0
  220. capo_codedeploy/types/batch_get_on_premises_instances_output.py +42 -0
  221. capo_codedeploy/types/blue_green_deployment_configuration.py +84 -0
  222. capo_codedeploy/types/blue_instance_termination_option.py +46 -0
  223. capo_codedeploy/types/boolean.py +5 -0
  224. capo_codedeploy/types/bundle_type.py +20 -0
  225. capo_codedeploy/types/cloud_formation_resource_type.py +5 -0
  226. capo_codedeploy/types/cloud_formation_target.py +112 -0
  227. capo_codedeploy/types/commit_id.py +5 -0
  228. capo_codedeploy/types/compute_platform.py +18 -0
  229. capo_codedeploy/types/continue_deployment_input.py +49 -0
  230. capo_codedeploy/types/create_application_input.py +67 -0
  231. capo_codedeploy/types/create_application_output.py +28 -0
  232. capo_codedeploy/types/create_deployment_config_input.py +115 -0
  233. capo_codedeploy/types/create_deployment_config_output.py +30 -0
  234. capo_codedeploy/types/create_deployment_group_input.py +353 -0
  235. capo_codedeploy/types/create_deployment_group_output.py +30 -0
  236. capo_codedeploy/types/create_deployment_input.py +178 -0
  237. capo_codedeploy/types/create_deployment_output.py +28 -0
  238. capo_codedeploy/types/delete_application_input.py +31 -0
  239. capo_codedeploy/types/delete_deployment_config_input.py +35 -0
  240. capo_codedeploy/types/delete_deployment_group_input.py +45 -0
  241. capo_codedeploy/types/delete_deployment_group_output.py +42 -0
  242. capo_codedeploy/types/delete_git_hub_account_token_input.py +30 -0
  243. capo_codedeploy/types/delete_git_hub_account_token_output.py +30 -0
  244. capo_codedeploy/types/delete_resources_by_external_id_input.py +28 -0
  245. capo_codedeploy/types/delete_resources_by_external_id_output.py +18 -0
  246. capo_codedeploy/types/deployment_config_id.py +5 -0
  247. capo_codedeploy/types/deployment_config_info.py +134 -0
  248. capo_codedeploy/types/deployment_config_name.py +5 -0
  249. capo_codedeploy/types/deployment_configs_list.py +19 -0
  250. capo_codedeploy/types/deployment_creator.py +23 -0
  251. capo_codedeploy/types/deployment_group_id.py +5 -0
  252. capo_codedeploy/types/deployment_group_info.py +420 -0
  253. capo_codedeploy/types/deployment_group_info_list.py +35 -0
  254. capo_codedeploy/types/deployment_group_name.py +5 -0
  255. capo_codedeploy/types/deployment_groups_list.py +19 -0
  256. capo_codedeploy/types/deployment_id.py +5 -0
  257. capo_codedeploy/types/deployment_info.py +499 -0
  258. capo_codedeploy/types/deployment_option.py +17 -0
  259. capo_codedeploy/types/deployment_overview.py +64 -0
  260. capo_codedeploy/types/deployment_ready_action.py +17 -0
  261. capo_codedeploy/types/deployment_ready_option.py +50 -0
  262. capo_codedeploy/types/deployment_status.py +23 -0
  263. capo_codedeploy/types/deployment_status_list.py +33 -0
  264. capo_codedeploy/types/deployment_status_message_list.py +19 -0
  265. capo_codedeploy/types/deployment_style.py +61 -0
  266. capo_codedeploy/types/deployment_target.py +115 -0
  267. capo_codedeploy/types/deployment_target_list.py +33 -0
  268. capo_codedeploy/types/deployment_target_type.py +19 -0
  269. capo_codedeploy/types/deployment_type.py +17 -0
  270. capo_codedeploy/types/deployment_wait_type.py +17 -0
  271. capo_codedeploy/types/deployments_info_list.py +31 -0
  272. capo_codedeploy/types/deployments_list.py +17 -0
  273. capo_codedeploy/types/deregister_on_premises_instance_input.py +33 -0
  274. capo_codedeploy/types/description.py +5 -0
  275. capo_codedeploy/types/diagnostics.py +63 -0
  276. capo_codedeploy/types/duration.py +5 -0
  277. capo_codedeploy/types/e_tag.py +5 -0
  278. capo_codedeploy/types/ec2_tag_filter.py +52 -0
  279. capo_codedeploy/types/ec2_tag_filter_list.py +29 -0
  280. capo_codedeploy/types/ec2_tag_filter_type.py +18 -0
  281. capo_codedeploy/types/ec2_tag_set.py +42 -0
  282. capo_codedeploy/types/ec2_tag_set_list.py +35 -0
  283. capo_codedeploy/types/ecs_cluster_name.py +5 -0
  284. capo_codedeploy/types/ecs_service.py +35 -0
  285. capo_codedeploy/types/ecs_service_list.py +29 -0
  286. capo_codedeploy/types/ecs_service_name.py +5 -0
  287. capo_codedeploy/types/ecs_target.py +114 -0
  288. capo_codedeploy/types/ecs_task_set.py +111 -0
  289. capo_codedeploy/types/ecs_task_set_count.py +5 -0
  290. capo_codedeploy/types/ecs_task_set_identifier.py +5 -0
  291. capo_codedeploy/types/ecs_task_set_list.py +29 -0
  292. capo_codedeploy/types/ecs_task_set_status.py +5 -0
  293. capo_codedeploy/types/elb_info.py +28 -0
  294. capo_codedeploy/types/elb_info_list.py +29 -0
  295. capo_codedeploy/types/elb_name.py +5 -0
  296. capo_codedeploy/types/error_code.py +49 -0
  297. capo_codedeploy/types/error_information.py +43 -0
  298. capo_codedeploy/types/error_message.py +5 -0
  299. capo_codedeploy/types/external_id.py +5 -0
  300. capo_codedeploy/types/file_exists_behavior.py +18 -0
  301. capo_codedeploy/types/filter_value.py +5 -0
  302. capo_codedeploy/types/filter_value_list.py +17 -0
  303. capo_codedeploy/types/generic_revision_info.py +96 -0
  304. capo_codedeploy/types/get_application_input.py +31 -0
  305. capo_codedeploy/types/get_application_output.py +40 -0
  306. capo_codedeploy/types/get_application_revision_input.py +51 -0
  307. capo_codedeploy/types/get_application_revision_output.py +70 -0
  308. capo_codedeploy/types/get_deployment_config_input.py +35 -0
  309. capo_codedeploy/types/get_deployment_config_output.py +42 -0
  310. capo_codedeploy/types/get_deployment_group_input.py +43 -0
  311. capo_codedeploy/types/get_deployment_group_output.py +42 -0
  312. capo_codedeploy/types/get_deployment_input.py +31 -0
  313. capo_codedeploy/types/get_deployment_instance_input.py +39 -0
  314. capo_codedeploy/types/get_deployment_instance_output.py +42 -0
  315. capo_codedeploy/types/get_deployment_output.py +40 -0
  316. capo_codedeploy/types/get_deployment_target_input.py +39 -0
  317. capo_codedeploy/types/get_deployment_target_output.py +42 -0
  318. capo_codedeploy/types/get_on_premises_instance_input.py +31 -0
  319. capo_codedeploy/types/get_on_premises_instance_output.py +40 -0
  320. capo_codedeploy/types/git_hub_account_token_name.py +5 -0
  321. capo_codedeploy/types/git_hub_account_token_name_list.py +19 -0
  322. capo_codedeploy/types/git_hub_location.py +35 -0
  323. capo_codedeploy/types/green_fleet_provisioning_action.py +17 -0
  324. capo_codedeploy/types/green_fleet_provisioning_option.py +42 -0
  325. capo_codedeploy/types/iam_session_arn.py +5 -0
  326. capo_codedeploy/types/iam_user_arn.py +5 -0
  327. capo_codedeploy/types/instance_action.py +17 -0
  328. capo_codedeploy/types/instance_arn.py +5 -0
  329. capo_codedeploy/types/instance_count.py +5 -0
  330. capo_codedeploy/types/instance_id.py +5 -0
  331. capo_codedeploy/types/instance_info.py +95 -0
  332. capo_codedeploy/types/instance_info_list.py +29 -0
  333. capo_codedeploy/types/instance_name.py +5 -0
  334. capo_codedeploy/types/instance_name_list.py +17 -0
  335. capo_codedeploy/types/instance_status.py +22 -0
  336. capo_codedeploy/types/instance_status_list.py +31 -0
  337. capo_codedeploy/types/instance_summary.py +107 -0
  338. capo_codedeploy/types/instance_summary_list.py +33 -0
  339. capo_codedeploy/types/instance_target.py +112 -0
  340. capo_codedeploy/types/instance_type.py +17 -0
  341. capo_codedeploy/types/instance_type_list.py +29 -0
  342. capo_codedeploy/types/instances_list.py +17 -0
  343. capo_codedeploy/types/key.py +5 -0
  344. capo_codedeploy/types/lambda_function_alias.py +5 -0
  345. capo_codedeploy/types/lambda_function_info.py +69 -0
  346. capo_codedeploy/types/lambda_function_name.py +5 -0
  347. capo_codedeploy/types/lambda_target.py +114 -0
  348. capo_codedeploy/types/last_deployment_info.py +74 -0
  349. capo_codedeploy/types/lifecycle_error_code.py +21 -0
  350. capo_codedeploy/types/lifecycle_event.py +95 -0
  351. capo_codedeploy/types/lifecycle_event_hook_execution_id.py +5 -0
  352. capo_codedeploy/types/lifecycle_event_list.py +31 -0
  353. capo_codedeploy/types/lifecycle_event_name.py +5 -0
  354. capo_codedeploy/types/lifecycle_event_status.py +21 -0
  355. capo_codedeploy/types/lifecycle_message.py +5 -0
  356. capo_codedeploy/types/list_application_revisions_input.py +111 -0
  357. capo_codedeploy/types/list_application_revisions_output.py +49 -0
  358. capo_codedeploy/types/list_applications_input.py +28 -0
  359. capo_codedeploy/types/list_applications_output.py +49 -0
  360. capo_codedeploy/types/list_deployment_configs_input.py +28 -0
  361. capo_codedeploy/types/list_deployment_configs_output.py +49 -0
  362. capo_codedeploy/types/list_deployment_groups_input.py +40 -0
  363. capo_codedeploy/types/list_deployment_groups_output.py +58 -0
  364. capo_codedeploy/types/list_deployment_instances_input.py +82 -0
  365. capo_codedeploy/types/list_deployment_instances_output.py +47 -0
  366. capo_codedeploy/types/list_deployment_targets_input.py +57 -0
  367. capo_codedeploy/types/list_deployment_targets_output.py +45 -0
  368. capo_codedeploy/types/list_deployments_input.py +93 -0
  369. capo_codedeploy/types/list_deployments_output.py +47 -0
  370. capo_codedeploy/types/list_git_hub_account_token_names_input.py +28 -0
  371. capo_codedeploy/types/list_git_hub_account_token_names_output.py +49 -0
  372. capo_codedeploy/types/list_on_premises_instances_input.py +68 -0
  373. capo_codedeploy/types/list_on_premises_instances_output.py +49 -0
  374. capo_codedeploy/types/list_state_filter_action.py +18 -0
  375. capo_codedeploy/types/list_tags_for_resource_input.py +38 -0
  376. capo_codedeploy/types/list_tags_for_resource_output.py +43 -0
  377. capo_codedeploy/types/listener_arn.py +5 -0
  378. capo_codedeploy/types/listener_arn_list.py +17 -0
  379. capo_codedeploy/types/load_balancer_info.py +80 -0
  380. capo_codedeploy/types/log_tail.py +5 -0
  381. capo_codedeploy/types/message.py +5 -0
  382. capo_codedeploy/types/minimum_healthy_hosts.py +50 -0
  383. capo_codedeploy/types/minimum_healthy_hosts_per_zone.py +50 -0
  384. capo_codedeploy/types/minimum_healthy_hosts_per_zone_type.py +17 -0
  385. capo_codedeploy/types/minimum_healthy_hosts_per_zone_value.py +5 -0
  386. capo_codedeploy/types/minimum_healthy_hosts_type.py +17 -0
  387. capo_codedeploy/types/minimum_healthy_hosts_value.py +5 -0
  388. capo_codedeploy/types/next_token.py +5 -0
  389. capo_codedeploy/types/nullable_boolean.py +5 -0
  390. capo_codedeploy/types/on_premises_tag_set.py +42 -0
  391. capo_codedeploy/types/on_premises_tag_set_list.py +31 -0
  392. capo_codedeploy/types/outdated_instances_strategy.py +17 -0
  393. capo_codedeploy/types/percentage.py +5 -0
  394. capo_codedeploy/types/put_lifecycle_event_hook_execution_status_input.py +60 -0
  395. capo_codedeploy/types/put_lifecycle_event_hook_execution_status_output.py +32 -0
  396. capo_codedeploy/types/raw_string.py +35 -0
  397. capo_codedeploy/types/raw_string_content.py +5 -0
  398. capo_codedeploy/types/raw_string_sha256.py +5 -0
  399. capo_codedeploy/types/register_application_revision_input.py +58 -0
  400. capo_codedeploy/types/register_on_premises_instance_input.py +47 -0
  401. capo_codedeploy/types/registration_status.py +17 -0
  402. capo_codedeploy/types/related_deployments.py +55 -0
  403. capo_codedeploy/types/remove_tags_from_on_premises_instances_input.py +61 -0
  404. capo_codedeploy/types/repository.py +5 -0
  405. capo_codedeploy/types/revision_info.py +63 -0
  406. capo_codedeploy/types/revision_info_list.py +29 -0
  407. capo_codedeploy/types/revision_location.py +114 -0
  408. capo_codedeploy/types/revision_location_list.py +33 -0
  409. capo_codedeploy/types/revision_location_type.py +19 -0
  410. capo_codedeploy/types/role.py +5 -0
  411. capo_codedeploy/types/rollback_info.py +49 -0
  412. capo_codedeploy/types/s3_bucket.py +5 -0
  413. capo_codedeploy/types/s3_key.py +5 -0
  414. capo_codedeploy/types/s3_location.py +64 -0
  415. capo_codedeploy/types/script_name.py +5 -0
  416. capo_codedeploy/types/skip_wait_time_for_instance_termination_input.py +28 -0
  417. capo_codedeploy/types/sort_order.py +17 -0
  418. capo_codedeploy/types/stop_deployment_input.py +40 -0
  419. capo_codedeploy/types/stop_deployment_output.py +43 -0
  420. capo_codedeploy/types/stop_status.py +17 -0
  421. capo_codedeploy/types/tag.py +35 -0
  422. capo_codedeploy/types/tag_filter.py +50 -0
  423. capo_codedeploy/types/tag_filter_list.py +29 -0
  424. capo_codedeploy/types/tag_filter_type.py +18 -0
  425. capo_codedeploy/types/tag_key_list.py +17 -0
  426. capo_codedeploy/types/tag_list.py +29 -0
  427. capo_codedeploy/types/tag_resource_input.py +45 -0
  428. capo_codedeploy/types/tag_resource_output.py +18 -0
  429. capo_codedeploy/types/target_arn.py +5 -0
  430. capo_codedeploy/types/target_filter_name.py +17 -0
  431. capo_codedeploy/types/target_filters.py +40 -0
  432. capo_codedeploy/types/target_group_info.py +28 -0
  433. capo_codedeploy/types/target_group_info_list.py +33 -0
  434. capo_codedeploy/types/target_group_name.py +5 -0
  435. capo_codedeploy/types/target_group_pair_info.py +79 -0
  436. capo_codedeploy/types/target_group_pair_info_list.py +35 -0
  437. capo_codedeploy/types/target_id.py +5 -0
  438. capo_codedeploy/types/target_id_list.py +17 -0
  439. capo_codedeploy/types/target_instances.py +78 -0
  440. capo_codedeploy/types/target_label.py +17 -0
  441. capo_codedeploy/types/target_status.py +22 -0
  442. capo_codedeploy/types/time.py +20 -0
  443. capo_codedeploy/types/time_based_canary.py +37 -0
  444. capo_codedeploy/types/time_based_linear.py +37 -0
  445. capo_codedeploy/types/time_range.py +50 -0
  446. capo_codedeploy/types/timestamp.py +20 -0
  447. capo_codedeploy/types/traffic_route.py +42 -0
  448. capo_codedeploy/types/traffic_routing_config.py +80 -0
  449. capo_codedeploy/types/traffic_routing_type.py +18 -0
  450. capo_codedeploy/types/traffic_weight.py +5 -0
  451. capo_codedeploy/types/trigger_config.py +58 -0
  452. capo_codedeploy/types/trigger_config_list.py +31 -0
  453. capo_codedeploy/types/trigger_event_type.py +25 -0
  454. capo_codedeploy/types/trigger_event_type_list.py +35 -0
  455. capo_codedeploy/types/trigger_name.py +5 -0
  456. capo_codedeploy/types/trigger_target_arn.py +5 -0
  457. capo_codedeploy/types/untag_resource_input.py +47 -0
  458. capo_codedeploy/types/untag_resource_output.py +18 -0
  459. capo_codedeploy/types/update_application_input.py +38 -0
  460. capo_codedeploy/types/update_deployment_group_input.py +343 -0
  461. capo_codedeploy/types/update_deployment_group_output.py +42 -0
  462. capo_codedeploy/types/value.py +5 -0
  463. capo_codedeploy/types/version.py +5 -0
  464. capo_codedeploy/types/version_id.py +5 -0
  465. capo_codedeploy/types/wait_time_in_mins.py +5 -0
  466. capo_codedeploy/types/wait_time_in_seconds.py +5 -0
  467. capo_codedeploy/types/zonal_config.py +63 -0
  468. capo_codedeploy-0.1.0.dist-info/METADATA +102 -0
  469. capo_codedeploy-0.1.0.dist-info/RECORD +472 -0
  470. capo_codedeploy-0.1.0.dist-info/WHEEL +5 -0
  471. capo_codedeploy-0.1.0.dist-info/licenses/LICENSE +21 -0
  472. capo_codedeploy-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,3229 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codedeploy#CodeDeploy_20141006``."""
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_codedeploy._auth._signers
11
+ import capo_codedeploy._auth._sigv4
12
+ from capo_codedeploy._auth._identity import Credentials
13
+ from capo_codedeploy._auth._providers import (
14
+ CredentialsProvider,
15
+ IdentityProvider,
16
+ StaticAwsCredentialsProvider,
17
+ default_aws_credentials_chain,
18
+ )
19
+ from capo_codedeploy._auth._zapros_handler import AuthMiddleware
20
+ from capo_codedeploy._pagination import resolve_path as _resolve_path
21
+ from capo_codedeploy._services._aws_config import aws_config
22
+ from capo_codedeploy._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_codedeploy.types.add_tags_to_on_premises_instances_input
33
+ import capo_codedeploy.types.alarm_configuration
34
+ import capo_codedeploy.types.application_name
35
+ import capo_codedeploy.types.application_revision_sort_by
36
+ import capo_codedeploy.types.applications_list
37
+ import capo_codedeploy.types.arn
38
+ import capo_codedeploy.types.auto_rollback_configuration
39
+ import capo_codedeploy.types.auto_scaling_group_name_list
40
+ import capo_codedeploy.types.batch_get_application_revisions_input
41
+ import capo_codedeploy.types.batch_get_application_revisions_output
42
+ import capo_codedeploy.types.batch_get_applications_input
43
+ import capo_codedeploy.types.batch_get_applications_output
44
+ import capo_codedeploy.types.batch_get_deployment_groups_input
45
+ import capo_codedeploy.types.batch_get_deployment_groups_output
46
+ import capo_codedeploy.types.batch_get_deployment_instances_input
47
+ import capo_codedeploy.types.batch_get_deployment_instances_output
48
+ import capo_codedeploy.types.batch_get_deployment_targets_input
49
+ import capo_codedeploy.types.batch_get_deployment_targets_output
50
+ import capo_codedeploy.types.batch_get_deployments_input
51
+ import capo_codedeploy.types.batch_get_deployments_output
52
+ import capo_codedeploy.types.batch_get_on_premises_instances_input
53
+ import capo_codedeploy.types.batch_get_on_premises_instances_output
54
+ import capo_codedeploy.types.blue_green_deployment_configuration
55
+ import capo_codedeploy.types.boolean
56
+ import capo_codedeploy.types.compute_platform
57
+ import capo_codedeploy.types.continue_deployment_input
58
+ import capo_codedeploy.types.create_application_input
59
+ import capo_codedeploy.types.create_application_output
60
+ import capo_codedeploy.types.create_deployment_config_input
61
+ import capo_codedeploy.types.create_deployment_config_output
62
+ import capo_codedeploy.types.create_deployment_group_input
63
+ import capo_codedeploy.types.create_deployment_group_output
64
+ import capo_codedeploy.types.create_deployment_input
65
+ import capo_codedeploy.types.create_deployment_output
66
+ import capo_codedeploy.types.delete_application_input
67
+ import capo_codedeploy.types.delete_deployment_config_input
68
+ import capo_codedeploy.types.delete_deployment_group_input
69
+ import capo_codedeploy.types.delete_deployment_group_output
70
+ import capo_codedeploy.types.delete_git_hub_account_token_input
71
+ import capo_codedeploy.types.delete_git_hub_account_token_output
72
+ import capo_codedeploy.types.delete_resources_by_external_id_input
73
+ import capo_codedeploy.types.delete_resources_by_external_id_output
74
+ import capo_codedeploy.types.deployment_config_name
75
+ import capo_codedeploy.types.deployment_group_name
76
+ import capo_codedeploy.types.deployment_groups_list
77
+ import capo_codedeploy.types.deployment_id
78
+ import capo_codedeploy.types.deployment_status_list
79
+ import capo_codedeploy.types.deployment_style
80
+ import capo_codedeploy.types.deployment_wait_type
81
+ import capo_codedeploy.types.deployments_list
82
+ import capo_codedeploy.types.deregister_on_premises_instance_input
83
+ import capo_codedeploy.types.description
84
+ import capo_codedeploy.types.ec2_tag_filter_list
85
+ import capo_codedeploy.types.ec2_tag_set
86
+ import capo_codedeploy.types.ecs_service_list
87
+ import capo_codedeploy.types.external_id
88
+ import capo_codedeploy.types.file_exists_behavior
89
+ import capo_codedeploy.types.get_application_input
90
+ import capo_codedeploy.types.get_application_output
91
+ import capo_codedeploy.types.get_application_revision_input
92
+ import capo_codedeploy.types.get_application_revision_output
93
+ import capo_codedeploy.types.get_deployment_config_input
94
+ import capo_codedeploy.types.get_deployment_config_output
95
+ import capo_codedeploy.types.get_deployment_group_input
96
+ import capo_codedeploy.types.get_deployment_group_output
97
+ import capo_codedeploy.types.get_deployment_input
98
+ import capo_codedeploy.types.get_deployment_instance_input
99
+ import capo_codedeploy.types.get_deployment_instance_output
100
+ import capo_codedeploy.types.get_deployment_output
101
+ import capo_codedeploy.types.get_deployment_target_input
102
+ import capo_codedeploy.types.get_deployment_target_output
103
+ import capo_codedeploy.types.get_on_premises_instance_input
104
+ import capo_codedeploy.types.get_on_premises_instance_output
105
+ import capo_codedeploy.types.git_hub_account_token_name
106
+ import capo_codedeploy.types.iam_session_arn
107
+ import capo_codedeploy.types.iam_user_arn
108
+ import capo_codedeploy.types.instance_id
109
+ import capo_codedeploy.types.instance_name
110
+ import capo_codedeploy.types.instance_name_list
111
+ import capo_codedeploy.types.instance_status_list
112
+ import capo_codedeploy.types.instance_type_list
113
+ import capo_codedeploy.types.instances_list
114
+ import capo_codedeploy.types.lifecycle_event_hook_execution_id
115
+ import capo_codedeploy.types.lifecycle_event_status
116
+ import capo_codedeploy.types.list_application_revisions_input
117
+ import capo_codedeploy.types.list_application_revisions_output
118
+ import capo_codedeploy.types.list_applications_input
119
+ import capo_codedeploy.types.list_applications_output
120
+ import capo_codedeploy.types.list_deployment_configs_input
121
+ import capo_codedeploy.types.list_deployment_configs_output
122
+ import capo_codedeploy.types.list_deployment_groups_input
123
+ import capo_codedeploy.types.list_deployment_groups_output
124
+ import capo_codedeploy.types.list_deployment_instances_input
125
+ import capo_codedeploy.types.list_deployment_instances_output
126
+ import capo_codedeploy.types.list_deployment_targets_input
127
+ import capo_codedeploy.types.list_deployment_targets_output
128
+ import capo_codedeploy.types.list_deployments_input
129
+ import capo_codedeploy.types.list_deployments_output
130
+ import capo_codedeploy.types.list_git_hub_account_token_names_input
131
+ import capo_codedeploy.types.list_git_hub_account_token_names_output
132
+ import capo_codedeploy.types.list_on_premises_instances_input
133
+ import capo_codedeploy.types.list_on_premises_instances_output
134
+ import capo_codedeploy.types.list_state_filter_action
135
+ import capo_codedeploy.types.list_tags_for_resource_input
136
+ import capo_codedeploy.types.list_tags_for_resource_output
137
+ import capo_codedeploy.types.load_balancer_info
138
+ import capo_codedeploy.types.minimum_healthy_hosts
139
+ import capo_codedeploy.types.next_token
140
+ import capo_codedeploy.types.nullable_boolean
141
+ import capo_codedeploy.types.on_premises_tag_set
142
+ import capo_codedeploy.types.outdated_instances_strategy
143
+ import capo_codedeploy.types.put_lifecycle_event_hook_execution_status_input
144
+ import capo_codedeploy.types.put_lifecycle_event_hook_execution_status_output
145
+ import capo_codedeploy.types.register_application_revision_input
146
+ import capo_codedeploy.types.register_on_premises_instance_input
147
+ import capo_codedeploy.types.registration_status
148
+ import capo_codedeploy.types.remove_tags_from_on_premises_instances_input
149
+ import capo_codedeploy.types.revision_location
150
+ import capo_codedeploy.types.revision_location_list
151
+ import capo_codedeploy.types.role
152
+ import capo_codedeploy.types.s3_bucket
153
+ import capo_codedeploy.types.s3_key
154
+ import capo_codedeploy.types.skip_wait_time_for_instance_termination_input
155
+ import capo_codedeploy.types.sort_order
156
+ import capo_codedeploy.types.stop_deployment_input
157
+ import capo_codedeploy.types.stop_deployment_output
158
+ import capo_codedeploy.types.tag_filter_list
159
+ import capo_codedeploy.types.tag_key_list
160
+ import capo_codedeploy.types.tag_list
161
+ import capo_codedeploy.types.tag_resource_input
162
+ import capo_codedeploy.types.tag_resource_output
163
+ import capo_codedeploy.types.target_filters
164
+ import capo_codedeploy.types.target_id
165
+ import capo_codedeploy.types.target_id_list
166
+ import capo_codedeploy.types.target_instances
167
+ import capo_codedeploy.types.time_range
168
+ import capo_codedeploy.types.traffic_routing_config
169
+ import capo_codedeploy.types.trigger_config_list
170
+ import capo_codedeploy.types.untag_resource_input
171
+ import capo_codedeploy.types.untag_resource_output
172
+ import capo_codedeploy.types.update_application_input
173
+ import capo_codedeploy.types.update_deployment_group_input
174
+ import capo_codedeploy.types.update_deployment_group_output
175
+ import capo_codedeploy.types.zonal_config
176
+
177
+
178
+ class CodeDeployClientConfig(TypedDict, total=False, closed=True):
179
+ operation_interceptors: Iterable[Interceptor[Any, Any]]
180
+ retry_max_attempts: int | None
181
+ region: str | None
182
+ use_dual_stack: bool | None
183
+ use_fips: bool | None
184
+ endpoint: str | None
185
+ credentials_provider: IdentityProvider[Credentials] | None
186
+
187
+
188
+ class CodeDeployClient:
189
+ """A client for the ``CodeDeploy`` service.
190
+
191
+ Args:
192
+ http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
193
+ operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
194
+ retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
195
+ region: The value of the ``AWS::Region`` endpoint parameter.
196
+ use_dual_stack: The value of the ``AWS::UseDualStack`` endpoint parameter.
197
+ use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
198
+ endpoint: The value of the ``SDK::Endpoint`` endpoint parameter.
199
+ credentials: AWS credentials for request signing.
200
+ credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
201
+ """
202
+
203
+ def __init__(
204
+ self,
205
+ http_handler: BaseHandler | None = None,
206
+ operation_interceptors: Iterable[Interceptor[Any, Any]] | None = None,
207
+ retry_max_attempts: int | None = None,
208
+ region: str | None = None,
209
+ use_dual_stack: bool | None = None,
210
+ use_fips: bool | None = None,
211
+ endpoint: str | None = None,
212
+ credentials: Credentials | None = None,
213
+ credentials_provider: CredentialsProvider | None = None,
214
+ ):
215
+ self._client = Client(http_handler).wrap_with_middleware(
216
+ lambda next: AuthMiddleware(next)
217
+ )
218
+ if credentials is not None and credentials_provider is not None:
219
+ warnings.warn(
220
+ "Both credentials and credentials_provider given; provider takes precedence"
221
+ )
222
+ resolved_credentials_provider: IdentityProvider[Credentials] | None = (
223
+ credentials_provider
224
+ )
225
+ if resolved_credentials_provider is None and credentials is not None:
226
+ resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
227
+ if resolved_credentials_provider is None and credentials is None:
228
+ resolved_credentials_provider = default_aws_credentials_chain(
229
+ Client(http_handler)
230
+ )
231
+ self._config = CodeDeployClientConfig(
232
+ {
233
+ "operation_interceptors": operation_interceptors or [],
234
+ "retry_max_attempts": retry_max_attempts,
235
+ "region": region,
236
+ "use_dual_stack": use_dual_stack,
237
+ "use_fips": use_fips,
238
+ "endpoint": endpoint,
239
+ "credentials_provider": resolved_credentials_provider,
240
+ }
241
+ )
242
+
243
+ def operation_options(
244
+ self, config_overrides: Optional[CodeDeployClientConfig] = None
245
+ ) -> tuple[Iterable[Interceptor[Any, Any]], OperationOptions]:
246
+ overrides: CodeDeployClientConfig = config_overrides or {}
247
+ interceptors_: list[Interceptor[Any, Any]] = [
248
+ *overrides.get(
249
+ "operation_interceptors", self._config.get("operation_interceptors", [])
250
+ ),
251
+ aws_config(),
252
+ retry(),
253
+ ]
254
+ options_: OperationOptions = OperationOptions(
255
+ client=self._client,
256
+ retry_max_attempts=overrides.get(
257
+ "retry_max_attempts", self._config.get("retry_max_attempts")
258
+ ),
259
+ region=overrides.get("region", self._config.get("region")),
260
+ use_dual_stack=overrides.get(
261
+ "use_dual_stack", self._config.get("use_dual_stack")
262
+ ),
263
+ use_fips=overrides.get("use_fips", self._config.get("use_fips")),
264
+ endpoint=overrides.get("endpoint", self._config.get("endpoint")),
265
+ credentials_provider=overrides.get(
266
+ "credentials_provider", self._config.get("credentials_provider")
267
+ ),
268
+ )
269
+ return interceptors_, options_
270
+
271
+ def add_tags_to_on_premises_instances(
272
+ self,
273
+ tags: "capo_codedeploy.types.tag_list.TagList",
274
+ instance_names: "capo_codedeploy.types.instance_name_list.InstanceNameList",
275
+ *,
276
+ config_overrides: Optional[CodeDeployClientConfig] = None,
277
+ ) -> None:
278
+ """<p>Adds tags to on-premises instances.</p>
279
+
280
+ Args:
281
+ tags: <p>The tag key-value pairs to add to the on-premises instances.</p> <p>Keys and values are both required. Keys cannot be null or empty strings. Value-only tags are not allowed.</p>
282
+ instance_names: <p>The names of the on-premises instances to which to add tags.</p>
283
+
284
+ Raises:
285
+ capo_codedeploy.errors.instance_limit_exceeded_exception.InstanceLimitExceededException: <p>The maximum number of allowed on-premises instances in a single call was exceeded.</p>
286
+ capo_codedeploy.errors.instance_name_required_exception.InstanceNameRequiredException: <p>An on-premises instance name was not specified.</p>
287
+ capo_codedeploy.errors.instance_not_registered_exception.InstanceNotRegisteredException: <p>The specified on-premises instance is not registered.</p>
288
+ capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name was specified in an invalid format.</p>
289
+ capo_codedeploy.errors.invalid_tag_exception.InvalidTagException: <p>The tag was specified in an invalid format.</p>
290
+ capo_codedeploy.errors.tag_limit_exceeded_exception.TagLimitExceededException: <p>The maximum allowed number of tags was exceeded.</p>
291
+ capo_codedeploy.errors.tag_required_exception.TagRequiredException: <p>A tag was not specified.</p>
292
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
293
+ """
294
+
295
+ def _handler(
296
+ req: "OperationRequest[capo_codedeploy.types.add_tags_to_on_premises_instances_input.AddTagsToOnPremisesInstancesInput]",
297
+ ) -> OperationResponse[None]:
298
+ import capo_codedeploy._operations.code_deploy_20141006.add_tags_to_on_premises_instances
299
+
300
+ output, http_response = (
301
+ capo_codedeploy._operations.code_deploy_20141006.add_tags_to_on_premises_instances.add_tags_to_on_premises_instances(
302
+ req.options, req.input
303
+ )
304
+ )
305
+ return OperationResponse(output=output, response=http_response)
306
+
307
+ interceptors_, options_ = self.operation_options(config_overrides)
308
+ input_: capo_codedeploy.types.add_tags_to_on_premises_instances_input.AddTagsToOnPremisesInstancesInput = {
309
+ "tags": tags,
310
+ "instance_names": instance_names,
311
+ }
312
+
313
+ response = execute_pipeline(
314
+ OperationRequest(input=input_, options=options_),
315
+ handler=_handler,
316
+ interceptors=list(interceptors_),
317
+ )
318
+ response.response.close()
319
+ return response.output
320
+
321
+ def batch_get_application_revisions(
322
+ self,
323
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
324
+ revisions: "capo_codedeploy.types.revision_location_list.RevisionLocationList",
325
+ *,
326
+ config_overrides: Optional[CodeDeployClientConfig] = None,
327
+ ) -> "capo_codedeploy.types.batch_get_application_revisions_output.BatchGetApplicationRevisionsOutput":
328
+ """<p>Gets information about one or more application revisions. The maximum number of application revisions that can be returned is 25.</p>
329
+
330
+ Args:
331
+ application_name: <p>The name of an CodeDeploy application about which to get revision information.</p>
332
+ revisions: <p>An array of <code>RevisionLocation</code> objects that specify information to get about the application revisions, including type and location. The maximum number of <code>RevisionLocation</code> objects you can specify is 25.</p>
333
+
334
+ Raises:
335
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
336
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
337
+ capo_codedeploy.errors.batch_limit_exceeded_exception.BatchLimitExceededException: <p>The maximum number of names or IDs allowed for this request (100) was exceeded.</p>
338
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
339
+ capo_codedeploy.errors.invalid_revision_exception.InvalidRevisionException: <p>The revision was specified in an invalid format.</p>
340
+ capo_codedeploy.errors.revision_required_exception.RevisionRequiredException: <p>The revision ID was not specified.</p>
341
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
342
+ """
343
+
344
+ def _handler(
345
+ req: "OperationRequest[capo_codedeploy.types.batch_get_application_revisions_input.BatchGetApplicationRevisionsInput]",
346
+ ) -> OperationResponse[
347
+ "capo_codedeploy.types.batch_get_application_revisions_output.BatchGetApplicationRevisionsOutput"
348
+ ]:
349
+ import capo_codedeploy._operations.code_deploy_20141006.batch_get_application_revisions
350
+
351
+ output, http_response = (
352
+ capo_codedeploy._operations.code_deploy_20141006.batch_get_application_revisions.batch_get_application_revisions(
353
+ req.options, req.input
354
+ )
355
+ )
356
+ return OperationResponse(output=output, response=http_response)
357
+
358
+ interceptors_, options_ = self.operation_options(config_overrides)
359
+ input_: capo_codedeploy.types.batch_get_application_revisions_input.BatchGetApplicationRevisionsInput = {
360
+ "application_name": application_name,
361
+ "revisions": revisions,
362
+ }
363
+
364
+ response = execute_pipeline(
365
+ OperationRequest(input=input_, options=options_),
366
+ handler=_handler,
367
+ interceptors=list(interceptors_),
368
+ )
369
+ response.response.close()
370
+ return response.output
371
+
372
+ def batch_get_applications(
373
+ self,
374
+ application_names: "capo_codedeploy.types.applications_list.ApplicationsList",
375
+ *,
376
+ config_overrides: Optional[CodeDeployClientConfig] = None,
377
+ ) -> (
378
+ "capo_codedeploy.types.batch_get_applications_output.BatchGetApplicationsOutput"
379
+ ):
380
+ """<p>Gets information about one or more applications. The maximum number of applications that can be returned is 100.</p>
381
+
382
+ Args:
383
+ application_names: <p>A list of application names separated by spaces. The maximum number of application names you can specify is 100.</p>
384
+
385
+ Raises:
386
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
387
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
388
+ capo_codedeploy.errors.batch_limit_exceeded_exception.BatchLimitExceededException: <p>The maximum number of names or IDs allowed for this request (100) was exceeded.</p>
389
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
390
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
391
+ """
392
+
393
+ def _handler(
394
+ req: "OperationRequest[capo_codedeploy.types.batch_get_applications_input.BatchGetApplicationsInput]",
395
+ ) -> OperationResponse[
396
+ "capo_codedeploy.types.batch_get_applications_output.BatchGetApplicationsOutput"
397
+ ]:
398
+ import capo_codedeploy._operations.code_deploy_20141006.batch_get_applications
399
+
400
+ output, http_response = (
401
+ capo_codedeploy._operations.code_deploy_20141006.batch_get_applications.batch_get_applications(
402
+ req.options, req.input
403
+ )
404
+ )
405
+ return OperationResponse(output=output, response=http_response)
406
+
407
+ interceptors_, options_ = self.operation_options(config_overrides)
408
+ input_: capo_codedeploy.types.batch_get_applications_input.BatchGetApplicationsInput = {
409
+ "application_names": application_names
410
+ }
411
+
412
+ response = execute_pipeline(
413
+ OperationRequest(input=input_, options=options_),
414
+ handler=_handler,
415
+ interceptors=list(interceptors_),
416
+ )
417
+ response.response.close()
418
+ return response.output
419
+
420
+ def batch_get_deployment_groups(
421
+ self,
422
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
423
+ deployment_group_names: "capo_codedeploy.types.deployment_groups_list.DeploymentGroupsList",
424
+ *,
425
+ config_overrides: Optional[CodeDeployClientConfig] = None,
426
+ ) -> "capo_codedeploy.types.batch_get_deployment_groups_output.BatchGetDeploymentGroupsOutput":
427
+ """<p>Gets information about one or more deployment groups.</p>
428
+
429
+ Args:
430
+ application_name: <p>The name of an CodeDeploy application associated with the applicable user or Amazon Web Services account.</p>
431
+ deployment_group_names: <p>The names of the deployment groups.</p>
432
+
433
+ Raises:
434
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
435
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
436
+ capo_codedeploy.errors.batch_limit_exceeded_exception.BatchLimitExceededException: <p>The maximum number of names or IDs allowed for this request (100) was exceeded.</p>
437
+ capo_codedeploy.errors.deployment_config_does_not_exist_exception.DeploymentConfigDoesNotExistException: <p>The deployment configuration does not exist with the user or Amazon Web Services account.</p>
438
+ capo_codedeploy.errors.deployment_group_name_required_exception.DeploymentGroupNameRequiredException: <p>The deployment group name was not specified.</p>
439
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
440
+ capo_codedeploy.errors.invalid_deployment_group_name_exception.InvalidDeploymentGroupNameException: <p>The deployment group name was specified in an invalid format.</p>
441
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
442
+ """
443
+
444
+ def _handler(
445
+ req: "OperationRequest[capo_codedeploy.types.batch_get_deployment_groups_input.BatchGetDeploymentGroupsInput]",
446
+ ) -> OperationResponse[
447
+ "capo_codedeploy.types.batch_get_deployment_groups_output.BatchGetDeploymentGroupsOutput"
448
+ ]:
449
+ import capo_codedeploy._operations.code_deploy_20141006.batch_get_deployment_groups
450
+
451
+ output, http_response = (
452
+ capo_codedeploy._operations.code_deploy_20141006.batch_get_deployment_groups.batch_get_deployment_groups(
453
+ req.options, req.input
454
+ )
455
+ )
456
+ return OperationResponse(output=output, response=http_response)
457
+
458
+ interceptors_, options_ = self.operation_options(config_overrides)
459
+ input_: capo_codedeploy.types.batch_get_deployment_groups_input.BatchGetDeploymentGroupsInput = {
460
+ "application_name": application_name,
461
+ "deployment_group_names": deployment_group_names,
462
+ }
463
+
464
+ response = execute_pipeline(
465
+ OperationRequest(input=input_, options=options_),
466
+ handler=_handler,
467
+ interceptors=list(interceptors_),
468
+ )
469
+ response.response.close()
470
+ return response.output
471
+
472
+ def batch_get_deployment_instances(
473
+ self,
474
+ deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
475
+ instance_ids: "capo_codedeploy.types.instances_list.InstancesList",
476
+ *,
477
+ config_overrides: Optional[CodeDeployClientConfig] = None,
478
+ ) -> "capo_codedeploy.types.batch_get_deployment_instances_output.BatchGetDeploymentInstancesOutput":
479
+ """<note> <p> This method works, but is deprecated. Use <code>BatchGetDeploymentTargets</code> instead. </p> </note> <p> Returns an array of one or more instances associated with a deployment. This method works with EC2/On-premises and Lambda compute platforms. The newer <code>BatchGetDeploymentTargets</code> works with all compute platforms. The maximum number of instances that can be returned is 25.</p>
480
+
481
+ Args:
482
+ deployment_id: <p> The unique ID of a deployment. </p>
483
+ instance_ids: <p>The unique IDs of instances used in the deployment. The maximum number of instance IDs you can specify is 25.</p>
484
+
485
+ Raises:
486
+ capo_codedeploy.errors.batch_limit_exceeded_exception.BatchLimitExceededException: <p>The maximum number of names or IDs allowed for this request (100) was exceeded.</p>
487
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
488
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
489
+ capo_codedeploy.errors.instance_id_required_exception.InstanceIdRequiredException: <p>The instance ID was not specified.</p>
490
+ capo_codedeploy.errors.invalid_compute_platform_exception.InvalidComputePlatformException: <p>The computePlatform is invalid. The computePlatform should be <code>Lambda</code>, <code>Server</code>, or <code>ECS</code>.</p>
491
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
492
+ capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name was specified in an invalid format.</p>
493
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
494
+ """
495
+
496
+ def _handler(
497
+ req: "OperationRequest[capo_codedeploy.types.batch_get_deployment_instances_input.BatchGetDeploymentInstancesInput]",
498
+ ) -> OperationResponse[
499
+ "capo_codedeploy.types.batch_get_deployment_instances_output.BatchGetDeploymentInstancesOutput"
500
+ ]:
501
+ import capo_codedeploy._operations.code_deploy_20141006.batch_get_deployment_instances
502
+
503
+ output, http_response = (
504
+ capo_codedeploy._operations.code_deploy_20141006.batch_get_deployment_instances.batch_get_deployment_instances(
505
+ req.options, req.input
506
+ )
507
+ )
508
+ return OperationResponse(output=output, response=http_response)
509
+
510
+ interceptors_, options_ = self.operation_options(config_overrides)
511
+ input_: capo_codedeploy.types.batch_get_deployment_instances_input.BatchGetDeploymentInstancesInput = {
512
+ "deployment_id": deployment_id,
513
+ "instance_ids": instance_ids,
514
+ }
515
+
516
+ response = execute_pipeline(
517
+ OperationRequest(input=input_, options=options_),
518
+ handler=_handler,
519
+ interceptors=list(interceptors_),
520
+ )
521
+ response.response.close()
522
+ return response.output
523
+
524
+ def batch_get_deployments(
525
+ self,
526
+ deployment_ids: "capo_codedeploy.types.deployments_list.DeploymentsList",
527
+ *,
528
+ config_overrides: Optional[CodeDeployClientConfig] = None,
529
+ ) -> "capo_codedeploy.types.batch_get_deployments_output.BatchGetDeploymentsOutput":
530
+ """<p>Gets information about one or more deployments. The maximum number of deployments that can be returned is 25.</p>
531
+
532
+ Args:
533
+ deployment_ids: <p> A list of deployment IDs, separated by spaces. The maximum number of deployment IDs you can specify is 25.</p>
534
+
535
+ Raises:
536
+ capo_codedeploy.errors.batch_limit_exceeded_exception.BatchLimitExceededException: <p>The maximum number of names or IDs allowed for this request (100) was exceeded.</p>
537
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
538
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
539
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
540
+ """
541
+
542
+ def _handler(
543
+ req: "OperationRequest[capo_codedeploy.types.batch_get_deployments_input.BatchGetDeploymentsInput]",
544
+ ) -> OperationResponse[
545
+ "capo_codedeploy.types.batch_get_deployments_output.BatchGetDeploymentsOutput"
546
+ ]:
547
+ import capo_codedeploy._operations.code_deploy_20141006.batch_get_deployments
548
+
549
+ output, http_response = (
550
+ capo_codedeploy._operations.code_deploy_20141006.batch_get_deployments.batch_get_deployments(
551
+ req.options, req.input
552
+ )
553
+ )
554
+ return OperationResponse(output=output, response=http_response)
555
+
556
+ interceptors_, options_ = self.operation_options(config_overrides)
557
+ input_: capo_codedeploy.types.batch_get_deployments_input.BatchGetDeploymentsInput = {
558
+ "deployment_ids": deployment_ids
559
+ }
560
+
561
+ response = execute_pipeline(
562
+ OperationRequest(input=input_, options=options_),
563
+ handler=_handler,
564
+ interceptors=list(interceptors_),
565
+ )
566
+ response.response.close()
567
+ return response.output
568
+
569
+ def batch_get_deployment_targets(
570
+ self,
571
+ deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
572
+ target_ids: "capo_codedeploy.types.target_id_list.TargetIdList",
573
+ *,
574
+ config_overrides: Optional[CodeDeployClientConfig] = None,
575
+ ) -> "capo_codedeploy.types.batch_get_deployment_targets_output.BatchGetDeploymentTargetsOutput":
576
+ """<p> Returns an array of one or more targets associated with a deployment. This method works with all compute types and should be used instead of the deprecated <code>BatchGetDeploymentInstances</code>. The maximum number of targets that can be returned is 25.</p> <p> The type of targets returned depends on the deployment's compute platform or deployment method: </p> <ul> <li> <p> <b>EC2/On-premises</b>: Information about Amazon EC2 instance targets. </p> </li> <li> <p> <b>Lambda</b>: Information about Lambda functions targets. </p> </li> <li> <p> <b>Amazon ECS</b>: Information about Amazon ECS service targets. </p> </li> <li> <p> <b>CloudFormation</b>: Information about targets of blue/green deployments initiated by a CloudFormation stack update.</p> </li> </ul>
577
+
578
+ Args:
579
+ deployment_id: <p> The unique ID of a deployment. </p>
580
+ target_ids: <p> The unique IDs of the deployment targets. The compute platform of the deployment determines the type of the targets and their formats. The maximum number of deployment target IDs you can specify is 25.</p> <ul> <li> <p> For deployments that use the EC2/On-premises compute platform, the target IDs are Amazon EC2 or on-premises instances IDs, and their target type is <code>instanceTarget</code>. </p> </li> <li> <p> For deployments that use the Lambda compute platform, the target IDs are the names of Lambda functions, and their target type is <code>instanceTarget</code>. </p> </li> <li> <p> For deployments that use the Amazon ECS compute platform, the target IDs are pairs of Amazon ECS clusters and services specified using the format <code><clustername>:<servicename></code>. Their target type is <code>ecsTarget</code>. </p> </li> <li> <p> For deployments that are deployed with CloudFormation, the target IDs are CloudFormation stack IDs. Their target type is <code>cloudFormationTarget</code>. </p> </li> </ul>
581
+
582
+ Raises:
583
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
584
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
585
+ capo_codedeploy.errors.deployment_not_started_exception.DeploymentNotStartedException: <p>The specified deployment has not started.</p>
586
+ capo_codedeploy.errors.deployment_target_does_not_exist_exception.DeploymentTargetDoesNotExistException: <p> The provided target ID does not belong to the attempted deployment. </p>
587
+ capo_codedeploy.errors.deployment_target_id_required_exception.DeploymentTargetIdRequiredException: <p> A deployment target ID was not provided. </p>
588
+ capo_codedeploy.errors.deployment_target_list_size_exceeded_exception.DeploymentTargetListSizeExceededException: <p> The maximum number of targets that can be associated with an Amazon ECS or Lambda deployment was exceeded. The target list of both types of deployments must have exactly one item. This exception does not apply to EC2/On-premises deployments. </p>
589
+ capo_codedeploy.errors.instance_does_not_exist_exception.InstanceDoesNotExistException: <p>The specified instance does not exist in the deployment group.</p>
590
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
591
+ capo_codedeploy.errors.invalid_deployment_target_id_exception.InvalidDeploymentTargetIdException: <p> The target ID provided was not valid. </p>
592
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
593
+ """
594
+
595
+ def _handler(
596
+ req: "OperationRequest[capo_codedeploy.types.batch_get_deployment_targets_input.BatchGetDeploymentTargetsInput]",
597
+ ) -> OperationResponse[
598
+ "capo_codedeploy.types.batch_get_deployment_targets_output.BatchGetDeploymentTargetsOutput"
599
+ ]:
600
+ import capo_codedeploy._operations.code_deploy_20141006.batch_get_deployment_targets
601
+
602
+ output, http_response = (
603
+ capo_codedeploy._operations.code_deploy_20141006.batch_get_deployment_targets.batch_get_deployment_targets(
604
+ req.options, req.input
605
+ )
606
+ )
607
+ return OperationResponse(output=output, response=http_response)
608
+
609
+ interceptors_, options_ = self.operation_options(config_overrides)
610
+ input_: capo_codedeploy.types.batch_get_deployment_targets_input.BatchGetDeploymentTargetsInput = {
611
+ "deployment_id": deployment_id,
612
+ "target_ids": target_ids,
613
+ }
614
+
615
+ response = execute_pipeline(
616
+ OperationRequest(input=input_, options=options_),
617
+ handler=_handler,
618
+ interceptors=list(interceptors_),
619
+ )
620
+ response.response.close()
621
+ return response.output
622
+
623
+ def batch_get_on_premises_instances(
624
+ self,
625
+ instance_names: "capo_codedeploy.types.instance_name_list.InstanceNameList",
626
+ *,
627
+ config_overrides: Optional[CodeDeployClientConfig] = None,
628
+ ) -> "capo_codedeploy.types.batch_get_on_premises_instances_output.BatchGetOnPremisesInstancesOutput":
629
+ """<p>Gets information about one or more on-premises instances. The maximum number of on-premises instances that can be returned is 25.</p>
630
+
631
+ Args:
632
+ instance_names: <p>The names of the on-premises instances about which to get information. The maximum number of instance names you can specify is 25.</p>
633
+
634
+ Raises:
635
+ capo_codedeploy.errors.batch_limit_exceeded_exception.BatchLimitExceededException: <p>The maximum number of names or IDs allowed for this request (100) was exceeded.</p>
636
+ capo_codedeploy.errors.instance_name_required_exception.InstanceNameRequiredException: <p>An on-premises instance name was not specified.</p>
637
+ capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name was specified in an invalid format.</p>
638
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
639
+ """
640
+
641
+ def _handler(
642
+ req: "OperationRequest[capo_codedeploy.types.batch_get_on_premises_instances_input.BatchGetOnPremisesInstancesInput]",
643
+ ) -> OperationResponse[
644
+ "capo_codedeploy.types.batch_get_on_premises_instances_output.BatchGetOnPremisesInstancesOutput"
645
+ ]:
646
+ import capo_codedeploy._operations.code_deploy_20141006.batch_get_on_premises_instances
647
+
648
+ output, http_response = (
649
+ capo_codedeploy._operations.code_deploy_20141006.batch_get_on_premises_instances.batch_get_on_premises_instances(
650
+ req.options, req.input
651
+ )
652
+ )
653
+ return OperationResponse(output=output, response=http_response)
654
+
655
+ interceptors_, options_ = self.operation_options(config_overrides)
656
+ input_: capo_codedeploy.types.batch_get_on_premises_instances_input.BatchGetOnPremisesInstancesInput = {
657
+ "instance_names": instance_names
658
+ }
659
+
660
+ response = execute_pipeline(
661
+ OperationRequest(input=input_, options=options_),
662
+ handler=_handler,
663
+ interceptors=list(interceptors_),
664
+ )
665
+ response.response.close()
666
+ return response.output
667
+
668
+ def continue_deployment(
669
+ self,
670
+ *,
671
+ config_overrides: Optional[CodeDeployClientConfig] = None,
672
+ deployment_id: Optional[
673
+ "capo_codedeploy.types.deployment_id.DeploymentId"
674
+ ] = None,
675
+ deployment_wait_type: Optional[
676
+ "capo_codedeploy.types.deployment_wait_type.DeploymentWaitType"
677
+ ] = None,
678
+ ) -> None:
679
+ """<p>For a blue/green deployment, starts the process of rerouting traffic from instances in the original environment to instances in the replacement environment without waiting for a specified wait time to elapse. (Traffic rerouting, which is achieved by registering instances in the replacement environment with the load balancer, can start as soon as all instances have a status of Ready.) </p>
680
+
681
+ Args:
682
+ deployment_id: <p> The unique ID of a blue/green deployment for which you want to start rerouting traffic to the replacement environment. </p>
683
+ deployment_wait_type: <p> The status of the deployment's waiting period. <code>READY_WAIT</code> indicates that the deployment is ready to start shifting traffic. <code>TERMINATION_WAIT</code> indicates that the traffic is shifted, but the original target is not terminated. </p>
684
+
685
+ Raises:
686
+ capo_codedeploy.errors.deployment_already_completed_exception.DeploymentAlreadyCompletedException: <p>The deployment is already complete.</p>
687
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
688
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
689
+ capo_codedeploy.errors.deployment_is_not_in_ready_state_exception.DeploymentIsNotInReadyStateException: <p>The deployment does not have a status of Ready and can't continue yet.</p>
690
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
691
+ capo_codedeploy.errors.invalid_deployment_status_exception.InvalidDeploymentStatusException: <p>The specified deployment status doesn't exist or cannot be determined.</p>
692
+ capo_codedeploy.errors.invalid_deployment_wait_type_exception.InvalidDeploymentWaitTypeException: <p> The wait type is invalid. </p>
693
+ capo_codedeploy.errors.unsupported_action_for_deployment_type_exception.UnsupportedActionForDeploymentTypeException: <p>A call was submitted that is not supported for the specified deployment type.</p>
694
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
695
+ """
696
+
697
+ def _handler(
698
+ req: "OperationRequest[capo_codedeploy.types.continue_deployment_input.ContinueDeploymentInput]",
699
+ ) -> OperationResponse[None]:
700
+ import capo_codedeploy._operations.code_deploy_20141006.continue_deployment
701
+
702
+ output, http_response = (
703
+ capo_codedeploy._operations.code_deploy_20141006.continue_deployment.continue_deployment(
704
+ req.options, req.input
705
+ )
706
+ )
707
+ return OperationResponse(output=output, response=http_response)
708
+
709
+ interceptors_, options_ = self.operation_options(config_overrides)
710
+ input_: capo_codedeploy.types.continue_deployment_input.ContinueDeploymentInput = {}
711
+ if deployment_id is not None:
712
+ input_["deployment_id"] = deployment_id
713
+ if deployment_wait_type is not None:
714
+ input_["deployment_wait_type"] = deployment_wait_type
715
+
716
+ response = execute_pipeline(
717
+ OperationRequest(input=input_, options=options_),
718
+ handler=_handler,
719
+ interceptors=list(interceptors_),
720
+ )
721
+ response.response.close()
722
+ return response.output
723
+
724
+ def create_application(
725
+ self,
726
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
727
+ *,
728
+ config_overrides: Optional[CodeDeployClientConfig] = None,
729
+ compute_platform: Optional[
730
+ "capo_codedeploy.types.compute_platform.ComputePlatform"
731
+ ] = None,
732
+ tags: Optional["capo_codedeploy.types.tag_list.TagList"] = None,
733
+ ) -> "capo_codedeploy.types.create_application_output.CreateApplicationOutput":
734
+ """<p>Creates an application.</p>
735
+
736
+ Args:
737
+ application_name: <p>The name of the application. This name must be unique with the applicable user or Amazon Web Services account.</p>
738
+ compute_platform: <p> The destination platform type for the deployment (<code>Lambda</code>, <code>Server</code>, or <code>ECS</code>).</p>
739
+ tags: <p> The metadata that you apply to CodeDeploy applications to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define. </p>
740
+
741
+ Raises:
742
+ capo_codedeploy.errors.application_already_exists_exception.ApplicationAlreadyExistsException: <p>An application with the specified name with the user or Amazon Web Services account already exists.</p>
743
+ capo_codedeploy.errors.application_limit_exceeded_exception.ApplicationLimitExceededException: <p>More applications were attempted to be created than are allowed.</p>
744
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
745
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
746
+ capo_codedeploy.errors.invalid_compute_platform_exception.InvalidComputePlatformException: <p>The computePlatform is invalid. The computePlatform should be <code>Lambda</code>, <code>Server</code>, or <code>ECS</code>.</p>
747
+ capo_codedeploy.errors.invalid_tags_to_add_exception.InvalidTagsToAddException: <p> The specified tags are not valid. </p>
748
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
749
+ """
750
+
751
+ def _handler(
752
+ req: "OperationRequest[capo_codedeploy.types.create_application_input.CreateApplicationInput]",
753
+ ) -> OperationResponse[
754
+ "capo_codedeploy.types.create_application_output.CreateApplicationOutput"
755
+ ]:
756
+ import capo_codedeploy._operations.code_deploy_20141006.create_application
757
+
758
+ output, http_response = (
759
+ capo_codedeploy._operations.code_deploy_20141006.create_application.create_application(
760
+ req.options, req.input
761
+ )
762
+ )
763
+ return OperationResponse(output=output, response=http_response)
764
+
765
+ interceptors_, options_ = self.operation_options(config_overrides)
766
+ input_: capo_codedeploy.types.create_application_input.CreateApplicationInput = {
767
+ "application_name": application_name
768
+ }
769
+ if compute_platform is not None:
770
+ input_["compute_platform"] = compute_platform
771
+ if tags is not None:
772
+ input_["tags"] = tags
773
+
774
+ response = execute_pipeline(
775
+ OperationRequest(input=input_, options=options_),
776
+ handler=_handler,
777
+ interceptors=list(interceptors_),
778
+ )
779
+ response.response.close()
780
+ return response.output
781
+
782
+ def create_deployment(
783
+ self,
784
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
785
+ *,
786
+ config_overrides: Optional[CodeDeployClientConfig] = None,
787
+ deployment_group_name: Optional[
788
+ "capo_codedeploy.types.deployment_group_name.DeploymentGroupName"
789
+ ] = None,
790
+ revision: Optional[
791
+ "capo_codedeploy.types.revision_location.RevisionLocation"
792
+ ] = None,
793
+ deployment_config_name: Optional[
794
+ "capo_codedeploy.types.deployment_config_name.DeploymentConfigName"
795
+ ] = None,
796
+ description: Optional["capo_codedeploy.types.description.Description"] = None,
797
+ ignore_application_stop_failures: Optional[
798
+ "capo_codedeploy.types.boolean.Boolean"
799
+ ] = None,
800
+ target_instances: Optional[
801
+ "capo_codedeploy.types.target_instances.TargetInstances"
802
+ ] = None,
803
+ auto_rollback_configuration: Optional[
804
+ "capo_codedeploy.types.auto_rollback_configuration.AutoRollbackConfiguration"
805
+ ] = None,
806
+ update_outdated_instances_only: Optional[
807
+ "capo_codedeploy.types.boolean.Boolean"
808
+ ] = None,
809
+ file_exists_behavior: Optional[
810
+ "capo_codedeploy.types.file_exists_behavior.FileExistsBehavior"
811
+ ] = None,
812
+ override_alarm_configuration: Optional[
813
+ "capo_codedeploy.types.alarm_configuration.AlarmConfiguration"
814
+ ] = None,
815
+ ) -> "capo_codedeploy.types.create_deployment_output.CreateDeploymentOutput":
816
+ """<p>Deploys an application revision through the specified deployment group.</p>
817
+
818
+ Args:
819
+ application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
820
+ deployment_group_name: <p>The name of the deployment group.</p>
821
+ revision: <p> The type and location of the revision to deploy. </p>
822
+ deployment_config_name: <p>The name of a deployment configuration associated with the user or Amazon Web Services account.</p> <p>If not specified, the value configured in the deployment group is used as the default. If the deployment group does not have a deployment configuration associated with it, <code>CodeDeployDefault</code>.<code>OneAtATime</code> is used by default.</p>
823
+ description: <p>A comment about the deployment.</p>
824
+ ignore_application_stop_failures: <p> If true, then if an <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, or <code>AfterBlockTraffic</code> deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if <code>ApplicationStop</code> fails, the deployment continues with <code>DownloadBundle</code>. If <code>BeforeBlockTraffic</code> fails, the deployment continues with <code>BlockTraffic</code>. If <code>AfterBlockTraffic</code> fails, the deployment continues with <code>ApplicationStop</code>. </p> <p> If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted. </p> <p> During a deployment, the CodeDeploy agent runs the scripts specified for <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail. </p> <p> If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use <code>ignoreApplicationStopFailures</code> to specify that the <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> failures should be ignored. </p>
825
+ target_instances: <p> Information about the instances that belong to the replacement environment in a blue/green deployment. </p>
826
+ auto_rollback_configuration: <p>Configuration information for an automatic rollback that is added when a deployment is created.</p>
827
+ update_outdated_instances_only: <p> Indicates whether to deploy to all instances or only to instances that are not running the latest application revision. </p>
828
+ file_exists_behavior: <p>Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.</p> <p>The <code>fileExistsBehavior</code> parameter takes any of the following values:</p> <ul> <li> <p>DISALLOW: The deployment fails. This is also the default behavior if no option is specified.</p> </li> <li> <p>OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.</p> </li> <li> <p>RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.</p> </li> </ul>
829
+ override_alarm_configuration: <p>Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration if you have set up alarms at the deployment group level that are causing deployment failures. In this case, you would call <code>CreateDeployment</code> to create a new deployment that uses a previous application revision that is known to work, and set its alarm configuration to turn off alarm polling. Turning off alarm polling ensures that the new deployment proceeds without being blocked by the alarm that was generated by the previous, failed, deployment.</p> <note> <p>If you specify an <code>overrideAlarmConfiguration</code>, you need the <code>UpdateDeploymentGroup</code> IAM permission when calling <code>CreateDeployment</code>.</p> </note>
830
+
831
+ Raises:
832
+ capo_codedeploy.errors.alarms_limit_exceeded_exception.AlarmsLimitExceededException: <p>The maximum number of alarms for a deployment group (10) was exceeded.</p>
833
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
834
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
835
+ capo_codedeploy.errors.deployment_config_does_not_exist_exception.DeploymentConfigDoesNotExistException: <p>The deployment configuration does not exist with the user or Amazon Web Services account.</p>
836
+ capo_codedeploy.errors.deployment_group_does_not_exist_exception.DeploymentGroupDoesNotExistException: <p>The named deployment group with the user or Amazon Web Services account does not exist.</p>
837
+ capo_codedeploy.errors.deployment_group_name_required_exception.DeploymentGroupNameRequiredException: <p>The deployment group name was not specified.</p>
838
+ capo_codedeploy.errors.deployment_limit_exceeded_exception.DeploymentLimitExceededException: <p>The number of allowed deployments was exceeded.</p>
839
+ capo_codedeploy.errors.description_too_long_exception.DescriptionTooLongException: <p>The description is too long.</p>
840
+ capo_codedeploy.errors.invalid_alarm_config_exception.InvalidAlarmConfigException: <p>The format of the alarm configuration is invalid. Possible causes include:</p> <ul> <li> <p>The alarm list is null.</p> </li> <li> <p>The alarm object is null.</p> </li> <li> <p>The alarm name is empty or null or exceeds the limit of 255 characters.</p> </li> <li> <p>Two alarms with the same name have been specified.</p> </li> <li> <p>The alarm configuration is enabled, but the alarm list is empty.</p> </li> </ul>
841
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
842
+ capo_codedeploy.errors.invalid_auto_rollback_config_exception.InvalidAutoRollbackConfigException: <p>The automatic rollback configuration was specified in an invalid format. For example, automatic rollback is enabled, but an invalid triggering event type or no event types were listed.</p>
843
+ capo_codedeploy.errors.invalid_auto_scaling_group_exception.InvalidAutoScalingGroupException: <p>The Auto Scaling group was specified in an invalid format or does not exist.</p>
844
+ capo_codedeploy.errors.invalid_deployment_config_name_exception.InvalidDeploymentConfigNameException: <p>The deployment configuration name was specified in an invalid format.</p>
845
+ capo_codedeploy.errors.invalid_deployment_group_name_exception.InvalidDeploymentGroupNameException: <p>The deployment group name was specified in an invalid format.</p>
846
+ capo_codedeploy.errors.invalid_file_exists_behavior_exception.InvalidFileExistsBehaviorException: <p>An invalid fileExistsBehavior option was specified to determine how CodeDeploy handles files or directories that already exist in a deployment target location, but weren't part of the previous successful deployment. Valid values include \"DISALLOW,\" \"OVERWRITE,\" and \"RETAIN.\"</p>
847
+ capo_codedeploy.errors.invalid_git_hub_account_token_exception.InvalidGitHubAccountTokenException: <p>The GitHub token is not valid.</p>
848
+ capo_codedeploy.errors.invalid_ignore_application_stop_failures_value_exception.InvalidIgnoreApplicationStopFailuresValueException: <p>The IgnoreApplicationStopFailures value is invalid. For Lambda deployments, <code>false</code> is expected. For EC2/On-premises deployments, <code>true</code> or <code>false</code> is expected.</p>
849
+ capo_codedeploy.errors.invalid_load_balancer_info_exception.InvalidLoadBalancerInfoException: <p>An invalid load balancer name, or no load balancer name, was specified.</p>
850
+ capo_codedeploy.errors.invalid_revision_exception.InvalidRevisionException: <p>The revision was specified in an invalid format.</p>
851
+ capo_codedeploy.errors.invalid_role_exception.InvalidRoleException: <p>The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.</p>
852
+ capo_codedeploy.errors.invalid_target_instances_exception.InvalidTargetInstancesException: <p>The target instance configuration is invalid. Possible causes include:</p> <ul> <li> <p>Configuration data for target instances was entered for an in-place deployment.</p> </li> <li> <p>The limit of 10 tags for a tag type was exceeded.</p> </li> <li> <p>The combined length of the tag names exceeded the limit. </p> </li> <li> <p>A specified tag is not currently applied to any instances.</p> </li> </ul>
853
+ capo_codedeploy.errors.invalid_traffic_routing_configuration_exception.InvalidTrafficRoutingConfigurationException: <p> The configuration that specifies how traffic is routed during a deployment is invalid.</p>
854
+ capo_codedeploy.errors.invalid_update_outdated_instances_only_value_exception.InvalidUpdateOutdatedInstancesOnlyValueException: <p>The UpdateOutdatedInstancesOnly value is invalid. For Lambda deployments, <code>false</code> is expected. For EC2/On-premises deployments, <code>true</code> or <code>false</code> is expected.</p>
855
+ capo_codedeploy.errors.revision_does_not_exist_exception.RevisionDoesNotExistException: <p>The named revision does not exist with the user or Amazon Web Services account.</p>
856
+ capo_codedeploy.errors.revision_required_exception.RevisionRequiredException: <p>The revision ID was not specified.</p>
857
+ capo_codedeploy.errors.throttling_exception.ThrottlingException: <p>An API function was called too frequently.</p>
858
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
859
+ """
860
+
861
+ def _handler(
862
+ req: "OperationRequest[capo_codedeploy.types.create_deployment_input.CreateDeploymentInput]",
863
+ ) -> OperationResponse[
864
+ "capo_codedeploy.types.create_deployment_output.CreateDeploymentOutput"
865
+ ]:
866
+ import capo_codedeploy._operations.code_deploy_20141006.create_deployment
867
+
868
+ output, http_response = (
869
+ capo_codedeploy._operations.code_deploy_20141006.create_deployment.create_deployment(
870
+ req.options, req.input
871
+ )
872
+ )
873
+ return OperationResponse(output=output, response=http_response)
874
+
875
+ interceptors_, options_ = self.operation_options(config_overrides)
876
+ input_: capo_codedeploy.types.create_deployment_input.CreateDeploymentInput = {
877
+ "application_name": application_name
878
+ }
879
+ if deployment_group_name is not None:
880
+ input_["deployment_group_name"] = deployment_group_name
881
+ if revision is not None:
882
+ input_["revision"] = revision
883
+ if deployment_config_name is not None:
884
+ input_["deployment_config_name"] = deployment_config_name
885
+ if description is not None:
886
+ input_["description"] = description
887
+ if ignore_application_stop_failures is not None:
888
+ input_["ignore_application_stop_failures"] = (
889
+ ignore_application_stop_failures
890
+ )
891
+ if target_instances is not None:
892
+ input_["target_instances"] = target_instances
893
+ if auto_rollback_configuration is not None:
894
+ input_["auto_rollback_configuration"] = auto_rollback_configuration
895
+ if update_outdated_instances_only is not None:
896
+ input_["update_outdated_instances_only"] = update_outdated_instances_only
897
+ if file_exists_behavior is not None:
898
+ input_["file_exists_behavior"] = file_exists_behavior
899
+ if override_alarm_configuration is not None:
900
+ input_["override_alarm_configuration"] = override_alarm_configuration
901
+
902
+ response = execute_pipeline(
903
+ OperationRequest(input=input_, options=options_),
904
+ handler=_handler,
905
+ interceptors=list(interceptors_),
906
+ )
907
+ response.response.close()
908
+ return response.output
909
+
910
+ def create_deployment_config(
911
+ self,
912
+ deployment_config_name: "capo_codedeploy.types.deployment_config_name.DeploymentConfigName",
913
+ *,
914
+ config_overrides: Optional[CodeDeployClientConfig] = None,
915
+ minimum_healthy_hosts: Optional[
916
+ "capo_codedeploy.types.minimum_healthy_hosts.MinimumHealthyHosts"
917
+ ] = None,
918
+ traffic_routing_config: Optional[
919
+ "capo_codedeploy.types.traffic_routing_config.TrafficRoutingConfig"
920
+ ] = None,
921
+ compute_platform: Optional[
922
+ "capo_codedeploy.types.compute_platform.ComputePlatform"
923
+ ] = None,
924
+ zonal_config: Optional["capo_codedeploy.types.zonal_config.ZonalConfig"] = None,
925
+ ) -> "capo_codedeploy.types.create_deployment_config_output.CreateDeploymentConfigOutput":
926
+ r"""<p> Creates a deployment configuration. </p>
927
+
928
+ Args:
929
+ deployment_config_name: <p>The name of the deployment configuration to create.</p>
930
+ minimum_healthy_hosts: <p>The minimum number of healthy instances that should be available at any time during the deployment. There are two parameters expected in the input: type and value.</p> <p>The type parameter takes either of the following values:</p> <ul> <li> <p>HOST_COUNT: The value parameter represents the minimum number of healthy instances as an absolute value.</p> </li> <li> <p>FLEET_PERCENT: The value parameter represents the minimum number of healthy instances as a percentage of the total number of instances in the deployment. If you specify FLEET_PERCENT, at the start of the deployment, CodeDeploy converts the percentage to the equivalent number of instances and rounds up fractional instances.</p> </li> </ul> <p>The value parameter takes an integer.</p> <p>For example, to set a minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 95.</p>
931
+ traffic_routing_config: <p>The configuration that specifies how the deployment traffic is routed.</p>
932
+ compute_platform: <p>The destination platform type for the deployment (<code>Lambda</code>, <code>Server</code>, or <code>ECS</code>).</p>
933
+ zonal_config: <p>Configure the <code>ZonalConfig</code> object if you want CodeDeploy to deploy your application to one <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones\">Availability Zone</a> at a time, within an Amazon Web Services Region.</p> <p>For more information about the zonal configuration feature, see <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations-create.html#zonal-config\">zonal configuration</a> in the <i>CodeDeploy User Guide</i>.</p>
934
+
935
+ Raises:
936
+ capo_codedeploy.errors.deployment_config_already_exists_exception.DeploymentConfigAlreadyExistsException: <p>A deployment configuration with the specified name with the user or Amazon Web Services account already exists.</p>
937
+ capo_codedeploy.errors.deployment_config_limit_exceeded_exception.DeploymentConfigLimitExceededException: <p>The deployment configurations limit was exceeded.</p>
938
+ capo_codedeploy.errors.deployment_config_name_required_exception.DeploymentConfigNameRequiredException: <p>The deployment configuration name was not specified.</p>
939
+ capo_codedeploy.errors.invalid_compute_platform_exception.InvalidComputePlatformException: <p>The computePlatform is invalid. The computePlatform should be <code>Lambda</code>, <code>Server</code>, or <code>ECS</code>.</p>
940
+ capo_codedeploy.errors.invalid_deployment_config_name_exception.InvalidDeploymentConfigNameException: <p>The deployment configuration name was specified in an invalid format.</p>
941
+ capo_codedeploy.errors.invalid_minimum_healthy_host_value_exception.InvalidMinimumHealthyHostValueException: <p>The minimum healthy instance value was specified in an invalid format.</p>
942
+ capo_codedeploy.errors.invalid_traffic_routing_configuration_exception.InvalidTrafficRoutingConfigurationException: <p> The configuration that specifies how traffic is routed during a deployment is invalid.</p>
943
+ capo_codedeploy.errors.invalid_zonal_deployment_configuration_exception.InvalidZonalDeploymentConfigurationException: <p>The <code>ZonalConfig</code> object is not valid.</p>
944
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
945
+ """
946
+
947
+ def _handler(
948
+ req: "OperationRequest[capo_codedeploy.types.create_deployment_config_input.CreateDeploymentConfigInput]",
949
+ ) -> OperationResponse[
950
+ "capo_codedeploy.types.create_deployment_config_output.CreateDeploymentConfigOutput"
951
+ ]:
952
+ import capo_codedeploy._operations.code_deploy_20141006.create_deployment_config
953
+
954
+ output, http_response = (
955
+ capo_codedeploy._operations.code_deploy_20141006.create_deployment_config.create_deployment_config(
956
+ req.options, req.input
957
+ )
958
+ )
959
+ return OperationResponse(output=output, response=http_response)
960
+
961
+ interceptors_, options_ = self.operation_options(config_overrides)
962
+ input_: capo_codedeploy.types.create_deployment_config_input.CreateDeploymentConfigInput = {
963
+ "deployment_config_name": deployment_config_name
964
+ }
965
+ if minimum_healthy_hosts is not None:
966
+ input_["minimum_healthy_hosts"] = minimum_healthy_hosts
967
+ if traffic_routing_config is not None:
968
+ input_["traffic_routing_config"] = traffic_routing_config
969
+ if compute_platform is not None:
970
+ input_["compute_platform"] = compute_platform
971
+ if zonal_config is not None:
972
+ input_["zonal_config"] = zonal_config
973
+
974
+ response = execute_pipeline(
975
+ OperationRequest(input=input_, options=options_),
976
+ handler=_handler,
977
+ interceptors=list(interceptors_),
978
+ )
979
+ response.response.close()
980
+ return response.output
981
+
982
+ def create_deployment_group(
983
+ self,
984
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
985
+ deployment_group_name: "capo_codedeploy.types.deployment_group_name.DeploymentGroupName",
986
+ service_role_arn: "capo_codedeploy.types.role.Role",
987
+ *,
988
+ config_overrides: Optional[CodeDeployClientConfig] = None,
989
+ deployment_config_name: Optional[
990
+ "capo_codedeploy.types.deployment_config_name.DeploymentConfigName"
991
+ ] = None,
992
+ ec2_tag_filters: Optional[
993
+ "capo_codedeploy.types.ec2_tag_filter_list.EC2TagFilterList"
994
+ ] = None,
995
+ on_premises_instance_tag_filters: Optional[
996
+ "capo_codedeploy.types.tag_filter_list.TagFilterList"
997
+ ] = None,
998
+ auto_scaling_groups: Optional[
999
+ "capo_codedeploy.types.auto_scaling_group_name_list.AutoScalingGroupNameList"
1000
+ ] = None,
1001
+ trigger_configurations: Optional[
1002
+ "capo_codedeploy.types.trigger_config_list.TriggerConfigList"
1003
+ ] = None,
1004
+ alarm_configuration: Optional[
1005
+ "capo_codedeploy.types.alarm_configuration.AlarmConfiguration"
1006
+ ] = None,
1007
+ auto_rollback_configuration: Optional[
1008
+ "capo_codedeploy.types.auto_rollback_configuration.AutoRollbackConfiguration"
1009
+ ] = None,
1010
+ outdated_instances_strategy: Optional[
1011
+ "capo_codedeploy.types.outdated_instances_strategy.OutdatedInstancesStrategy"
1012
+ ] = None,
1013
+ deployment_style: Optional[
1014
+ "capo_codedeploy.types.deployment_style.DeploymentStyle"
1015
+ ] = None,
1016
+ blue_green_deployment_configuration: Optional[
1017
+ "capo_codedeploy.types.blue_green_deployment_configuration.BlueGreenDeploymentConfiguration"
1018
+ ] = None,
1019
+ load_balancer_info: Optional[
1020
+ "capo_codedeploy.types.load_balancer_info.LoadBalancerInfo"
1021
+ ] = None,
1022
+ ec2_tag_set: Optional["capo_codedeploy.types.ec2_tag_set.EC2TagSet"] = None,
1023
+ ecs_services: Optional[
1024
+ "capo_codedeploy.types.ecs_service_list.ECSServiceList"
1025
+ ] = None,
1026
+ on_premises_tag_set: Optional[
1027
+ "capo_codedeploy.types.on_premises_tag_set.OnPremisesTagSet"
1028
+ ] = None,
1029
+ tags: Optional["capo_codedeploy.types.tag_list.TagList"] = None,
1030
+ termination_hook_enabled: Optional[
1031
+ "capo_codedeploy.types.nullable_boolean.NullableBoolean"
1032
+ ] = None,
1033
+ ) -> "capo_codedeploy.types.create_deployment_group_output.CreateDeploymentGroupOutput":
1034
+ r"""<p>Creates a deployment group to which application revisions are deployed.</p>
1035
+
1036
+ Args:
1037
+ application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
1038
+ deployment_group_name: <p>The name of a new deployment group for the specified application.</p>
1039
+ deployment_config_name: <p>If specified, the deployment configuration name can be either one of the predefined configurations provided with CodeDeploy or a custom deployment configuration that you create by calling the create deployment configuration operation.</p> <p> <code>CodeDeployDefault.OneAtATime</code> is the default deployment configuration. It is used if a configuration isn't specified for the deployment or deployment group.</p> <p>For more information about the predefined deployment configurations in CodeDeploy, see <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations.html\">Working with Deployment Configurations in CodeDeploy</a> in the <i>CodeDeploy User Guide</i>.</p>
1040
+ ec2_tag_filters: <p>The Amazon EC2 tags on which to filter. The deployment group includes Amazon EC2 instances with any of the specified tags. Cannot be used in the same call as ec2TagSet.</p>
1041
+ on_premises_instance_tag_filters: <p>The on-premises instance tags on which to filter. The deployment group includes on-premises instances with any of the specified tags. Cannot be used in the same call as <code>OnPremisesTagSet</code>.</p>
1042
+ auto_scaling_groups: <p>A list of associated Amazon EC2 Auto Scaling groups.</p>
1043
+ service_role_arn: <p>A service role Amazon Resource Name (ARN) that allows CodeDeploy to act on the user's behalf when interacting with Amazon Web Services services.</p>
1044
+ trigger_configurations: <p>Information about triggers to create when the deployment group is created. For examples, see <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-sns.html\">Create a Trigger for an CodeDeploy Event</a> in the <i>CodeDeploy User Guide</i>.</p>
1045
+ alarm_configuration: <p>Information to add about Amazon CloudWatch alarms when the deployment group is created.</p>
1046
+ auto_rollback_configuration: <p>Configuration information for an automatic rollback that is added when a deployment group is created.</p>
1047
+ outdated_instances_strategy: <p>Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.</p> <p>If this option is set to <code>UPDATE</code> or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.</p> <p>If this option is set to <code>IGNORE</code>, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.</p>
1048
+ deployment_style: <p>Information about the type of deployment, in-place or blue/green, that you want to run and whether to route deployment traffic behind a load balancer.</p>
1049
+ blue_green_deployment_configuration: <p>Information about blue/green deployment options for a deployment group.</p>
1050
+ load_balancer_info: <p>Information about the load balancer used in a deployment.</p>
1051
+ ec2_tag_set: <p>Information about groups of tags applied to Amazon EC2 instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups. Cannot be used in the same call as <code>ec2TagFilters</code>.</p>
1052
+ ecs_services: <p> The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <code><clustername>:<servicename></code>. </p>
1053
+ on_premises_tag_set: <p>Information about groups of tags applied to on-premises instances. The deployment group includes only on-premises instances identified by all of the tag groups. Cannot be used in the same call as <code>onPremisesInstanceTagFilters</code>.</p>
1054
+ tags: <p> The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define. </p>
1055
+ termination_hook_enabled: <p>This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html\">Integrating CodeDeploy with Amazon EC2 Auto Scaling</a> in the <i>CodeDeploy User Guide</i>.</p> <p>Set <code>terminationHookEnabled</code> to <code>true</code> to have CodeDeploy install a termination hook into your Auto Scaling group when you create a deployment group. When this hook is installed, CodeDeploy will perform termination deployments.</p> <p>For information about termination deployments, see <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors-hook-enable\">Enabling termination deployments during Auto Scaling scale-in events</a> in the <i>CodeDeploy User Guide</i>.</p> <p>For more information about Auto Scaling scale-in events, see the <a href=\"https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html#as-lifecycle-scale-in\">Scale in</a> topic in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
1056
+
1057
+ Raises:
1058
+ capo_codedeploy.errors.alarms_limit_exceeded_exception.AlarmsLimitExceededException: <p>The maximum number of alarms for a deployment group (10) was exceeded.</p>
1059
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
1060
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
1061
+ capo_codedeploy.errors.deployment_config_does_not_exist_exception.DeploymentConfigDoesNotExistException: <p>The deployment configuration does not exist with the user or Amazon Web Services account.</p>
1062
+ capo_codedeploy.errors.deployment_group_already_exists_exception.DeploymentGroupAlreadyExistsException: <p>A deployment group with the specified name with the user or Amazon Web Services account already exists.</p>
1063
+ capo_codedeploy.errors.deployment_group_limit_exceeded_exception.DeploymentGroupLimitExceededException: <p> The deployment groups limit was exceeded.</p>
1064
+ capo_codedeploy.errors.deployment_group_name_required_exception.DeploymentGroupNameRequiredException: <p>The deployment group name was not specified.</p>
1065
+ capo_codedeploy.errors.ecs_service_mapping_limit_exceeded_exception.ECSServiceMappingLimitExceededException: <p> The Amazon ECS service is associated with more than one deployment groups. An Amazon ECS service can be associated with only one deployment group. </p>
1066
+ capo_codedeploy.errors.invalid_alarm_config_exception.InvalidAlarmConfigException: <p>The format of the alarm configuration is invalid. Possible causes include:</p> <ul> <li> <p>The alarm list is null.</p> </li> <li> <p>The alarm object is null.</p> </li> <li> <p>The alarm name is empty or null or exceeds the limit of 255 characters.</p> </li> <li> <p>Two alarms with the same name have been specified.</p> </li> <li> <p>The alarm configuration is enabled, but the alarm list is empty.</p> </li> </ul>
1067
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
1068
+ capo_codedeploy.errors.invalid_auto_rollback_config_exception.InvalidAutoRollbackConfigException: <p>The automatic rollback configuration was specified in an invalid format. For example, automatic rollback is enabled, but an invalid triggering event type or no event types were listed.</p>
1069
+ capo_codedeploy.errors.invalid_auto_scaling_group_exception.InvalidAutoScalingGroupException: <p>The Auto Scaling group was specified in an invalid format or does not exist.</p>
1070
+ capo_codedeploy.errors.invalid_blue_green_deployment_configuration_exception.InvalidBlueGreenDeploymentConfigurationException: <p>The configuration for the blue/green deployment group was provided in an invalid format. For information about deployment configuration format, see <a>CreateDeploymentConfig</a>.</p>
1071
+ capo_codedeploy.errors.invalid_deployment_config_name_exception.InvalidDeploymentConfigNameException: <p>The deployment configuration name was specified in an invalid format.</p>
1072
+ capo_codedeploy.errors.invalid_deployment_group_name_exception.InvalidDeploymentGroupNameException: <p>The deployment group name was specified in an invalid format.</p>
1073
+ capo_codedeploy.errors.invalid_deployment_style_exception.InvalidDeploymentStyleException: <p>An invalid deployment style was specified. Valid deployment types include \"IN_PLACE\" and \"BLUE_GREEN.\" Valid deployment options include \"WITH_TRAFFIC_CONTROL\" and \"WITHOUT_TRAFFIC_CONTROL.\"</p>
1074
+ capo_codedeploy.errors.invalid_ec2_tag_combination_exception.InvalidEC2TagCombinationException: <p>A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but only one of these data types can be used in a single call.</p>
1075
+ capo_codedeploy.errors.invalid_ec2_tag_exception.InvalidEC2TagException: <p>The tag was specified in an invalid format.</p>
1076
+ capo_codedeploy.errors.invalid_ecs_service_exception.InvalidECSServiceException: <p> The Amazon ECS service identifier is not valid. </p>
1077
+ capo_codedeploy.errors.invalid_input_exception.InvalidInputException: <p>The input was specified in an invalid format.</p>
1078
+ capo_codedeploy.errors.invalid_load_balancer_info_exception.InvalidLoadBalancerInfoException: <p>An invalid load balancer name, or no load balancer name, was specified.</p>
1079
+ capo_codedeploy.errors.invalid_on_premises_tag_combination_exception.InvalidOnPremisesTagCombinationException: <p>A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, but only one of these data types can be used in a single call.</p>
1080
+ capo_codedeploy.errors.invalid_role_exception.InvalidRoleException: <p>The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.</p>
1081
+ capo_codedeploy.errors.invalid_tag_exception.InvalidTagException: <p>The tag was specified in an invalid format.</p>
1082
+ capo_codedeploy.errors.invalid_tags_to_add_exception.InvalidTagsToAddException: <p> The specified tags are not valid. </p>
1083
+ capo_codedeploy.errors.invalid_target_group_pair_exception.InvalidTargetGroupPairException: <p> A target group pair associated with this deployment is not valid. </p>
1084
+ capo_codedeploy.errors.invalid_traffic_routing_configuration_exception.InvalidTrafficRoutingConfigurationException: <p> The configuration that specifies how traffic is routed during a deployment is invalid.</p>
1085
+ capo_codedeploy.errors.invalid_trigger_config_exception.InvalidTriggerConfigException: <p>The trigger was specified in an invalid format.</p>
1086
+ capo_codedeploy.errors.lifecycle_hook_limit_exceeded_exception.LifecycleHookLimitExceededException: <p>The limit for lifecycle hooks was exceeded.</p>
1087
+ capo_codedeploy.errors.role_required_exception.RoleRequiredException: <p>The role ID was not specified.</p>
1088
+ capo_codedeploy.errors.tag_set_list_limit_exceeded_exception.TagSetListLimitExceededException: <p>The number of tag groups included in the tag set list exceeded the maximum allowed limit of 3.</p>
1089
+ capo_codedeploy.errors.throttling_exception.ThrottlingException: <p>An API function was called too frequently.</p>
1090
+ capo_codedeploy.errors.trigger_targets_limit_exceeded_exception.TriggerTargetsLimitExceededException: <p>The maximum allowed number of triggers was exceeded.</p>
1091
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1092
+ """
1093
+
1094
+ def _handler(
1095
+ req: "OperationRequest[capo_codedeploy.types.create_deployment_group_input.CreateDeploymentGroupInput]",
1096
+ ) -> OperationResponse[
1097
+ "capo_codedeploy.types.create_deployment_group_output.CreateDeploymentGroupOutput"
1098
+ ]:
1099
+ import capo_codedeploy._operations.code_deploy_20141006.create_deployment_group
1100
+
1101
+ output, http_response = (
1102
+ capo_codedeploy._operations.code_deploy_20141006.create_deployment_group.create_deployment_group(
1103
+ req.options, req.input
1104
+ )
1105
+ )
1106
+ return OperationResponse(output=output, response=http_response)
1107
+
1108
+ interceptors_, options_ = self.operation_options(config_overrides)
1109
+ input_: capo_codedeploy.types.create_deployment_group_input.CreateDeploymentGroupInput = {
1110
+ "application_name": application_name,
1111
+ "deployment_group_name": deployment_group_name,
1112
+ "service_role_arn": service_role_arn,
1113
+ }
1114
+ if deployment_config_name is not None:
1115
+ input_["deployment_config_name"] = deployment_config_name
1116
+ if ec2_tag_filters is not None:
1117
+ input_["ec2_tag_filters"] = ec2_tag_filters
1118
+ if on_premises_instance_tag_filters is not None:
1119
+ input_["on_premises_instance_tag_filters"] = (
1120
+ on_premises_instance_tag_filters
1121
+ )
1122
+ if auto_scaling_groups is not None:
1123
+ input_["auto_scaling_groups"] = auto_scaling_groups
1124
+ if trigger_configurations is not None:
1125
+ input_["trigger_configurations"] = trigger_configurations
1126
+ if alarm_configuration is not None:
1127
+ input_["alarm_configuration"] = alarm_configuration
1128
+ if auto_rollback_configuration is not None:
1129
+ input_["auto_rollback_configuration"] = auto_rollback_configuration
1130
+ if outdated_instances_strategy is not None:
1131
+ input_["outdated_instances_strategy"] = outdated_instances_strategy
1132
+ if deployment_style is not None:
1133
+ input_["deployment_style"] = deployment_style
1134
+ if blue_green_deployment_configuration is not None:
1135
+ input_["blue_green_deployment_configuration"] = (
1136
+ blue_green_deployment_configuration
1137
+ )
1138
+ if load_balancer_info is not None:
1139
+ input_["load_balancer_info"] = load_balancer_info
1140
+ if ec2_tag_set is not None:
1141
+ input_["ec2_tag_set"] = ec2_tag_set
1142
+ if ecs_services is not None:
1143
+ input_["ecs_services"] = ecs_services
1144
+ if on_premises_tag_set is not None:
1145
+ input_["on_premises_tag_set"] = on_premises_tag_set
1146
+ if tags is not None:
1147
+ input_["tags"] = tags
1148
+ if termination_hook_enabled is not None:
1149
+ input_["termination_hook_enabled"] = termination_hook_enabled
1150
+
1151
+ response = execute_pipeline(
1152
+ OperationRequest(input=input_, options=options_),
1153
+ handler=_handler,
1154
+ interceptors=list(interceptors_),
1155
+ )
1156
+ response.response.close()
1157
+ return response.output
1158
+
1159
+ def delete_application(
1160
+ self,
1161
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
1162
+ *,
1163
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1164
+ ) -> None:
1165
+ """<p>Deletes an application.</p>
1166
+
1167
+ Args:
1168
+ application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
1169
+
1170
+ Raises:
1171
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
1172
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
1173
+ capo_codedeploy.errors.invalid_role_exception.InvalidRoleException: <p>The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.</p>
1174
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1175
+ """
1176
+
1177
+ def _handler(
1178
+ req: "OperationRequest[capo_codedeploy.types.delete_application_input.DeleteApplicationInput]",
1179
+ ) -> OperationResponse[None]:
1180
+ import capo_codedeploy._operations.code_deploy_20141006.delete_application
1181
+
1182
+ output, http_response = (
1183
+ capo_codedeploy._operations.code_deploy_20141006.delete_application.delete_application(
1184
+ req.options, req.input
1185
+ )
1186
+ )
1187
+ return OperationResponse(output=output, response=http_response)
1188
+
1189
+ interceptors_, options_ = self.operation_options(config_overrides)
1190
+ input_: capo_codedeploy.types.delete_application_input.DeleteApplicationInput = {
1191
+ "application_name": application_name
1192
+ }
1193
+
1194
+ response = execute_pipeline(
1195
+ OperationRequest(input=input_, options=options_),
1196
+ handler=_handler,
1197
+ interceptors=list(interceptors_),
1198
+ )
1199
+ response.response.close()
1200
+ return response.output
1201
+
1202
+ def delete_deployment_config(
1203
+ self,
1204
+ deployment_config_name: "capo_codedeploy.types.deployment_config_name.DeploymentConfigName",
1205
+ *,
1206
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1207
+ ) -> None:
1208
+ """<p>Deletes a deployment configuration.</p> <note> <p>A deployment configuration cannot be deleted if it is currently in use. Predefined configurations cannot be deleted.</p> </note>
1209
+
1210
+ Args:
1211
+ deployment_config_name: <p>The name of a deployment configuration associated with the user or Amazon Web Services account.</p>
1212
+
1213
+ Raises:
1214
+ capo_codedeploy.errors.deployment_config_in_use_exception.DeploymentConfigInUseException: <p>The deployment configuration is still in use.</p>
1215
+ capo_codedeploy.errors.deployment_config_name_required_exception.DeploymentConfigNameRequiredException: <p>The deployment configuration name was not specified.</p>
1216
+ capo_codedeploy.errors.invalid_deployment_config_name_exception.InvalidDeploymentConfigNameException: <p>The deployment configuration name was specified in an invalid format.</p>
1217
+ capo_codedeploy.errors.invalid_operation_exception.InvalidOperationException: <p>An invalid operation was detected.</p>
1218
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1219
+ """
1220
+
1221
+ def _handler(
1222
+ req: "OperationRequest[capo_codedeploy.types.delete_deployment_config_input.DeleteDeploymentConfigInput]",
1223
+ ) -> OperationResponse[None]:
1224
+ import capo_codedeploy._operations.code_deploy_20141006.delete_deployment_config
1225
+
1226
+ output, http_response = (
1227
+ capo_codedeploy._operations.code_deploy_20141006.delete_deployment_config.delete_deployment_config(
1228
+ req.options, req.input
1229
+ )
1230
+ )
1231
+ return OperationResponse(output=output, response=http_response)
1232
+
1233
+ interceptors_, options_ = self.operation_options(config_overrides)
1234
+ input_: capo_codedeploy.types.delete_deployment_config_input.DeleteDeploymentConfigInput = {
1235
+ "deployment_config_name": deployment_config_name
1236
+ }
1237
+
1238
+ response = execute_pipeline(
1239
+ OperationRequest(input=input_, options=options_),
1240
+ handler=_handler,
1241
+ interceptors=list(interceptors_),
1242
+ )
1243
+ response.response.close()
1244
+ return response.output
1245
+
1246
+ def delete_deployment_group(
1247
+ self,
1248
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
1249
+ deployment_group_name: "capo_codedeploy.types.deployment_group_name.DeploymentGroupName",
1250
+ *,
1251
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1252
+ ) -> "capo_codedeploy.types.delete_deployment_group_output.DeleteDeploymentGroupOutput":
1253
+ """<p>Deletes a deployment group.</p>
1254
+
1255
+ Args:
1256
+ application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
1257
+ deployment_group_name: <p>The name of a deployment group for the specified application.</p>
1258
+
1259
+ Raises:
1260
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
1261
+ capo_codedeploy.errors.deployment_group_name_required_exception.DeploymentGroupNameRequiredException: <p>The deployment group name was not specified.</p>
1262
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
1263
+ capo_codedeploy.errors.invalid_deployment_group_name_exception.InvalidDeploymentGroupNameException: <p>The deployment group name was specified in an invalid format.</p>
1264
+ capo_codedeploy.errors.invalid_role_exception.InvalidRoleException: <p>The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.</p>
1265
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1266
+ """
1267
+
1268
+ def _handler(
1269
+ req: "OperationRequest[capo_codedeploy.types.delete_deployment_group_input.DeleteDeploymentGroupInput]",
1270
+ ) -> OperationResponse[
1271
+ "capo_codedeploy.types.delete_deployment_group_output.DeleteDeploymentGroupOutput"
1272
+ ]:
1273
+ import capo_codedeploy._operations.code_deploy_20141006.delete_deployment_group
1274
+
1275
+ output, http_response = (
1276
+ capo_codedeploy._operations.code_deploy_20141006.delete_deployment_group.delete_deployment_group(
1277
+ req.options, req.input
1278
+ )
1279
+ )
1280
+ return OperationResponse(output=output, response=http_response)
1281
+
1282
+ interceptors_, options_ = self.operation_options(config_overrides)
1283
+ input_: capo_codedeploy.types.delete_deployment_group_input.DeleteDeploymentGroupInput = {
1284
+ "application_name": application_name,
1285
+ "deployment_group_name": deployment_group_name,
1286
+ }
1287
+
1288
+ response = execute_pipeline(
1289
+ OperationRequest(input=input_, options=options_),
1290
+ handler=_handler,
1291
+ interceptors=list(interceptors_),
1292
+ )
1293
+ response.response.close()
1294
+ return response.output
1295
+
1296
+ def delete_git_hub_account_token(
1297
+ self,
1298
+ *,
1299
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1300
+ token_name: Optional[
1301
+ "capo_codedeploy.types.git_hub_account_token_name.GitHubAccountTokenName"
1302
+ ] = None,
1303
+ ) -> "capo_codedeploy.types.delete_git_hub_account_token_output.DeleteGitHubAccountTokenOutput":
1304
+ """<p>Deletes a GitHub account connection.</p>
1305
+
1306
+ Args:
1307
+ token_name: <p>The name of the GitHub account connection to delete.</p>
1308
+
1309
+ Raises:
1310
+ capo_codedeploy.errors.git_hub_account_token_does_not_exist_exception.GitHubAccountTokenDoesNotExistException: <p>No GitHub account connection exists with the named specified in the call.</p>
1311
+ capo_codedeploy.errors.git_hub_account_token_name_required_exception.GitHubAccountTokenNameRequiredException: <p>The call is missing a required GitHub account connection name.</p>
1312
+ capo_codedeploy.errors.invalid_git_hub_account_token_name_exception.InvalidGitHubAccountTokenNameException: <p>The format of the specified GitHub account connection name is invalid.</p>
1313
+ capo_codedeploy.errors.operation_not_supported_exception.OperationNotSupportedException: <p>The API used does not support the deployment.</p>
1314
+ capo_codedeploy.errors.resource_validation_exception.ResourceValidationException: <p>The specified resource could not be validated.</p>
1315
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1316
+ """
1317
+
1318
+ def _handler(
1319
+ req: "OperationRequest[capo_codedeploy.types.delete_git_hub_account_token_input.DeleteGitHubAccountTokenInput]",
1320
+ ) -> OperationResponse[
1321
+ "capo_codedeploy.types.delete_git_hub_account_token_output.DeleteGitHubAccountTokenOutput"
1322
+ ]:
1323
+ import capo_codedeploy._operations.code_deploy_20141006.delete_git_hub_account_token
1324
+
1325
+ output, http_response = (
1326
+ capo_codedeploy._operations.code_deploy_20141006.delete_git_hub_account_token.delete_git_hub_account_token(
1327
+ req.options, req.input
1328
+ )
1329
+ )
1330
+ return OperationResponse(output=output, response=http_response)
1331
+
1332
+ interceptors_, options_ = self.operation_options(config_overrides)
1333
+ input_: capo_codedeploy.types.delete_git_hub_account_token_input.DeleteGitHubAccountTokenInput = {}
1334
+ if token_name is not None:
1335
+ input_["token_name"] = token_name
1336
+
1337
+ response = execute_pipeline(
1338
+ OperationRequest(input=input_, options=options_),
1339
+ handler=_handler,
1340
+ interceptors=list(interceptors_),
1341
+ )
1342
+ response.response.close()
1343
+ return response.output
1344
+
1345
+ def delete_resources_by_external_id(
1346
+ self,
1347
+ *,
1348
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1349
+ external_id: Optional["capo_codedeploy.types.external_id.ExternalId"] = None,
1350
+ ) -> "capo_codedeploy.types.delete_resources_by_external_id_output.DeleteResourcesByExternalIdOutput":
1351
+ """<p>Deletes resources linked to an external ID. This action only applies if you have configured blue/green deployments through CloudFormation. </p> <note> <p>It is not necessary to call this action directly. CloudFormation calls it on your behalf when it needs to delete stack resources. This action is offered publicly in case you need to delete resources to comply with General Data Protection Regulation (GDPR) requirements.</p> </note>
1352
+
1353
+ Args:
1354
+ external_id: <p>The unique ID of an external resource (for example, a CloudFormation stack ID) that is linked to one or more CodeDeploy resources.</p>
1355
+
1356
+ Raises:
1357
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1358
+ """
1359
+
1360
+ def _handler(
1361
+ req: "OperationRequest[capo_codedeploy.types.delete_resources_by_external_id_input.DeleteResourcesByExternalIdInput]",
1362
+ ) -> OperationResponse[
1363
+ "capo_codedeploy.types.delete_resources_by_external_id_output.DeleteResourcesByExternalIdOutput"
1364
+ ]:
1365
+ import capo_codedeploy._operations.code_deploy_20141006.delete_resources_by_external_id
1366
+
1367
+ output, http_response = (
1368
+ capo_codedeploy._operations.code_deploy_20141006.delete_resources_by_external_id.delete_resources_by_external_id(
1369
+ req.options, req.input
1370
+ )
1371
+ )
1372
+ return OperationResponse(output=output, response=http_response)
1373
+
1374
+ interceptors_, options_ = self.operation_options(config_overrides)
1375
+ input_: capo_codedeploy.types.delete_resources_by_external_id_input.DeleteResourcesByExternalIdInput = {}
1376
+ if external_id is not None:
1377
+ input_["external_id"] = external_id
1378
+
1379
+ response = execute_pipeline(
1380
+ OperationRequest(input=input_, options=options_),
1381
+ handler=_handler,
1382
+ interceptors=list(interceptors_),
1383
+ )
1384
+ response.response.close()
1385
+ return response.output
1386
+
1387
+ def deregister_on_premises_instance(
1388
+ self,
1389
+ instance_name: "capo_codedeploy.types.instance_name.InstanceName",
1390
+ *,
1391
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1392
+ ) -> None:
1393
+ """<p>Deregisters an on-premises instance.</p>
1394
+
1395
+ Args:
1396
+ instance_name: <p>The name of the on-premises instance to deregister.</p>
1397
+
1398
+ Raises:
1399
+ capo_codedeploy.errors.instance_name_required_exception.InstanceNameRequiredException: <p>An on-premises instance name was not specified.</p>
1400
+ capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name was specified in an invalid format.</p>
1401
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1402
+ """
1403
+
1404
+ def _handler(
1405
+ req: "OperationRequest[capo_codedeploy.types.deregister_on_premises_instance_input.DeregisterOnPremisesInstanceInput]",
1406
+ ) -> OperationResponse[None]:
1407
+ import capo_codedeploy._operations.code_deploy_20141006.deregister_on_premises_instance
1408
+
1409
+ output, http_response = (
1410
+ capo_codedeploy._operations.code_deploy_20141006.deregister_on_premises_instance.deregister_on_premises_instance(
1411
+ req.options, req.input
1412
+ )
1413
+ )
1414
+ return OperationResponse(output=output, response=http_response)
1415
+
1416
+ interceptors_, options_ = self.operation_options(config_overrides)
1417
+ input_: capo_codedeploy.types.deregister_on_premises_instance_input.DeregisterOnPremisesInstanceInput = {
1418
+ "instance_name": instance_name
1419
+ }
1420
+
1421
+ response = execute_pipeline(
1422
+ OperationRequest(input=input_, options=options_),
1423
+ handler=_handler,
1424
+ interceptors=list(interceptors_),
1425
+ )
1426
+ response.response.close()
1427
+ return response.output
1428
+
1429
+ def get_application(
1430
+ self,
1431
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
1432
+ *,
1433
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1434
+ ) -> "capo_codedeploy.types.get_application_output.GetApplicationOutput":
1435
+ """<p>Gets information about an application.</p>
1436
+
1437
+ Args:
1438
+ application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
1439
+
1440
+ Raises:
1441
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
1442
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
1443
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
1444
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1445
+ """
1446
+
1447
+ def _handler(
1448
+ req: "OperationRequest[capo_codedeploy.types.get_application_input.GetApplicationInput]",
1449
+ ) -> OperationResponse[
1450
+ "capo_codedeploy.types.get_application_output.GetApplicationOutput"
1451
+ ]:
1452
+ import capo_codedeploy._operations.code_deploy_20141006.get_application
1453
+
1454
+ output, http_response = (
1455
+ capo_codedeploy._operations.code_deploy_20141006.get_application.get_application(
1456
+ req.options, req.input
1457
+ )
1458
+ )
1459
+ return OperationResponse(output=output, response=http_response)
1460
+
1461
+ interceptors_, options_ = self.operation_options(config_overrides)
1462
+ input_: capo_codedeploy.types.get_application_input.GetApplicationInput = {
1463
+ "application_name": application_name
1464
+ }
1465
+
1466
+ response = execute_pipeline(
1467
+ OperationRequest(input=input_, options=options_),
1468
+ handler=_handler,
1469
+ interceptors=list(interceptors_),
1470
+ )
1471
+ response.response.close()
1472
+ return response.output
1473
+
1474
+ def get_application_revision(
1475
+ self,
1476
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
1477
+ revision: "capo_codedeploy.types.revision_location.RevisionLocation",
1478
+ *,
1479
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1480
+ ) -> "capo_codedeploy.types.get_application_revision_output.GetApplicationRevisionOutput":
1481
+ """<p>Gets information about an application revision.</p>
1482
+
1483
+ Args:
1484
+ application_name: <p>The name of the application that corresponds to the revision.</p>
1485
+ revision: <p>Information about the application revision to get, including type and location.</p>
1486
+
1487
+ Raises:
1488
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
1489
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
1490
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
1491
+ capo_codedeploy.errors.invalid_revision_exception.InvalidRevisionException: <p>The revision was specified in an invalid format.</p>
1492
+ capo_codedeploy.errors.revision_does_not_exist_exception.RevisionDoesNotExistException: <p>The named revision does not exist with the user or Amazon Web Services account.</p>
1493
+ capo_codedeploy.errors.revision_required_exception.RevisionRequiredException: <p>The revision ID was not specified.</p>
1494
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1495
+ """
1496
+
1497
+ def _handler(
1498
+ req: "OperationRequest[capo_codedeploy.types.get_application_revision_input.GetApplicationRevisionInput]",
1499
+ ) -> OperationResponse[
1500
+ "capo_codedeploy.types.get_application_revision_output.GetApplicationRevisionOutput"
1501
+ ]:
1502
+ import capo_codedeploy._operations.code_deploy_20141006.get_application_revision
1503
+
1504
+ output, http_response = (
1505
+ capo_codedeploy._operations.code_deploy_20141006.get_application_revision.get_application_revision(
1506
+ req.options, req.input
1507
+ )
1508
+ )
1509
+ return OperationResponse(output=output, response=http_response)
1510
+
1511
+ interceptors_, options_ = self.operation_options(config_overrides)
1512
+ input_: capo_codedeploy.types.get_application_revision_input.GetApplicationRevisionInput = {
1513
+ "application_name": application_name,
1514
+ "revision": revision,
1515
+ }
1516
+
1517
+ response = execute_pipeline(
1518
+ OperationRequest(input=input_, options=options_),
1519
+ handler=_handler,
1520
+ interceptors=list(interceptors_),
1521
+ )
1522
+ response.response.close()
1523
+ return response.output
1524
+
1525
+ def get_deployment(
1526
+ self,
1527
+ deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
1528
+ *,
1529
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1530
+ ) -> "capo_codedeploy.types.get_deployment_output.GetDeploymentOutput":
1531
+ """<p>Gets information about a deployment.</p> <note> <p> The <code>content</code> property of the <code>appSpecContent</code> object in the returned revision is always null. Use <code>GetApplicationRevision</code> and the <code>sha256</code> property of the returned <code>appSpecContent</code> object to get the content of the deployment’s AppSpec file. </p> </note>
1532
+
1533
+ Args:
1534
+ deployment_id: <p> The unique ID of a deployment associated with the user or Amazon Web Services account. </p>
1535
+
1536
+ Raises:
1537
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
1538
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
1539
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
1540
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1541
+ """
1542
+
1543
+ def _handler(
1544
+ req: "OperationRequest[capo_codedeploy.types.get_deployment_input.GetDeploymentInput]",
1545
+ ) -> OperationResponse[
1546
+ "capo_codedeploy.types.get_deployment_output.GetDeploymentOutput"
1547
+ ]:
1548
+ import capo_codedeploy._operations.code_deploy_20141006.get_deployment
1549
+
1550
+ output, http_response = (
1551
+ capo_codedeploy._operations.code_deploy_20141006.get_deployment.get_deployment(
1552
+ req.options, req.input
1553
+ )
1554
+ )
1555
+ return OperationResponse(output=output, response=http_response)
1556
+
1557
+ interceptors_, options_ = self.operation_options(config_overrides)
1558
+ input_: capo_codedeploy.types.get_deployment_input.GetDeploymentInput = {
1559
+ "deployment_id": deployment_id
1560
+ }
1561
+
1562
+ response = execute_pipeline(
1563
+ OperationRequest(input=input_, options=options_),
1564
+ handler=_handler,
1565
+ interceptors=list(interceptors_),
1566
+ )
1567
+ response.response.close()
1568
+ return response.output
1569
+
1570
+ def get_deployment_config(
1571
+ self,
1572
+ deployment_config_name: "capo_codedeploy.types.deployment_config_name.DeploymentConfigName",
1573
+ *,
1574
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1575
+ ) -> "capo_codedeploy.types.get_deployment_config_output.GetDeploymentConfigOutput":
1576
+ """<p>Gets information about a deployment configuration.</p>
1577
+
1578
+ Args:
1579
+ deployment_config_name: <p>The name of a deployment configuration associated with the user or Amazon Web Services account.</p>
1580
+
1581
+ Raises:
1582
+ capo_codedeploy.errors.deployment_config_does_not_exist_exception.DeploymentConfigDoesNotExistException: <p>The deployment configuration does not exist with the user or Amazon Web Services account.</p>
1583
+ capo_codedeploy.errors.deployment_config_name_required_exception.DeploymentConfigNameRequiredException: <p>The deployment configuration name was not specified.</p>
1584
+ capo_codedeploy.errors.invalid_compute_platform_exception.InvalidComputePlatformException: <p>The computePlatform is invalid. The computePlatform should be <code>Lambda</code>, <code>Server</code>, or <code>ECS</code>.</p>
1585
+ capo_codedeploy.errors.invalid_deployment_config_name_exception.InvalidDeploymentConfigNameException: <p>The deployment configuration name was specified in an invalid format.</p>
1586
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1587
+ """
1588
+
1589
+ def _handler(
1590
+ req: "OperationRequest[capo_codedeploy.types.get_deployment_config_input.GetDeploymentConfigInput]",
1591
+ ) -> OperationResponse[
1592
+ "capo_codedeploy.types.get_deployment_config_output.GetDeploymentConfigOutput"
1593
+ ]:
1594
+ import capo_codedeploy._operations.code_deploy_20141006.get_deployment_config
1595
+
1596
+ output, http_response = (
1597
+ capo_codedeploy._operations.code_deploy_20141006.get_deployment_config.get_deployment_config(
1598
+ req.options, req.input
1599
+ )
1600
+ )
1601
+ return OperationResponse(output=output, response=http_response)
1602
+
1603
+ interceptors_, options_ = self.operation_options(config_overrides)
1604
+ input_: capo_codedeploy.types.get_deployment_config_input.GetDeploymentConfigInput = {
1605
+ "deployment_config_name": deployment_config_name
1606
+ }
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 get_deployment_group(
1617
+ self,
1618
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
1619
+ deployment_group_name: "capo_codedeploy.types.deployment_group_name.DeploymentGroupName",
1620
+ *,
1621
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1622
+ ) -> "capo_codedeploy.types.get_deployment_group_output.GetDeploymentGroupOutput":
1623
+ """<p>Gets information about a deployment group.</p>
1624
+
1625
+ Args:
1626
+ application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
1627
+ deployment_group_name: <p>The name of a deployment group for the specified application.</p>
1628
+
1629
+ Raises:
1630
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
1631
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
1632
+ capo_codedeploy.errors.deployment_config_does_not_exist_exception.DeploymentConfigDoesNotExistException: <p>The deployment configuration does not exist with the user or Amazon Web Services account.</p>
1633
+ capo_codedeploy.errors.deployment_group_does_not_exist_exception.DeploymentGroupDoesNotExistException: <p>The named deployment group with the user or Amazon Web Services account does not exist.</p>
1634
+ capo_codedeploy.errors.deployment_group_name_required_exception.DeploymentGroupNameRequiredException: <p>The deployment group name was not specified.</p>
1635
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
1636
+ capo_codedeploy.errors.invalid_deployment_group_name_exception.InvalidDeploymentGroupNameException: <p>The deployment group name was specified in an invalid format.</p>
1637
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1638
+ """
1639
+
1640
+ def _handler(
1641
+ req: "OperationRequest[capo_codedeploy.types.get_deployment_group_input.GetDeploymentGroupInput]",
1642
+ ) -> OperationResponse[
1643
+ "capo_codedeploy.types.get_deployment_group_output.GetDeploymentGroupOutput"
1644
+ ]:
1645
+ import capo_codedeploy._operations.code_deploy_20141006.get_deployment_group
1646
+
1647
+ output, http_response = (
1648
+ capo_codedeploy._operations.code_deploy_20141006.get_deployment_group.get_deployment_group(
1649
+ req.options, req.input
1650
+ )
1651
+ )
1652
+ return OperationResponse(output=output, response=http_response)
1653
+
1654
+ interceptors_, options_ = self.operation_options(config_overrides)
1655
+ input_: capo_codedeploy.types.get_deployment_group_input.GetDeploymentGroupInput = {
1656
+ "application_name": application_name,
1657
+ "deployment_group_name": deployment_group_name,
1658
+ }
1659
+
1660
+ response = execute_pipeline(
1661
+ OperationRequest(input=input_, options=options_),
1662
+ handler=_handler,
1663
+ interceptors=list(interceptors_),
1664
+ )
1665
+ response.response.close()
1666
+ return response.output
1667
+
1668
+ def get_deployment_instance(
1669
+ self,
1670
+ deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
1671
+ instance_id: "capo_codedeploy.types.instance_id.InstanceId",
1672
+ *,
1673
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1674
+ ) -> "capo_codedeploy.types.get_deployment_instance_output.GetDeploymentInstanceOutput":
1675
+ """<p>Gets information about an instance as part of a deployment.</p>
1676
+
1677
+ Args:
1678
+ deployment_id: <p> The unique ID of a deployment. </p>
1679
+ instance_id: <p> The unique ID of an instance in the deployment group. </p>
1680
+
1681
+ Raises:
1682
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
1683
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
1684
+ capo_codedeploy.errors.instance_does_not_exist_exception.InstanceDoesNotExistException: <p>The specified instance does not exist in the deployment group.</p>
1685
+ capo_codedeploy.errors.instance_id_required_exception.InstanceIdRequiredException: <p>The instance ID was not specified.</p>
1686
+ capo_codedeploy.errors.invalid_compute_platform_exception.InvalidComputePlatformException: <p>The computePlatform is invalid. The computePlatform should be <code>Lambda</code>, <code>Server</code>, or <code>ECS</code>.</p>
1687
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
1688
+ capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name was specified in an invalid format.</p>
1689
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1690
+ """
1691
+
1692
+ def _handler(
1693
+ req: "OperationRequest[capo_codedeploy.types.get_deployment_instance_input.GetDeploymentInstanceInput]",
1694
+ ) -> OperationResponse[
1695
+ "capo_codedeploy.types.get_deployment_instance_output.GetDeploymentInstanceOutput"
1696
+ ]:
1697
+ import capo_codedeploy._operations.code_deploy_20141006.get_deployment_instance
1698
+
1699
+ output, http_response = (
1700
+ capo_codedeploy._operations.code_deploy_20141006.get_deployment_instance.get_deployment_instance(
1701
+ req.options, req.input
1702
+ )
1703
+ )
1704
+ return OperationResponse(output=output, response=http_response)
1705
+
1706
+ interceptors_, options_ = self.operation_options(config_overrides)
1707
+ input_: capo_codedeploy.types.get_deployment_instance_input.GetDeploymentInstanceInput = {
1708
+ "deployment_id": deployment_id,
1709
+ "instance_id": instance_id,
1710
+ }
1711
+
1712
+ response = execute_pipeline(
1713
+ OperationRequest(input=input_, options=options_),
1714
+ handler=_handler,
1715
+ interceptors=list(interceptors_),
1716
+ )
1717
+ response.response.close()
1718
+ return response.output
1719
+
1720
+ def get_deployment_target(
1721
+ self,
1722
+ deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
1723
+ target_id: "capo_codedeploy.types.target_id.TargetId",
1724
+ *,
1725
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1726
+ ) -> "capo_codedeploy.types.get_deployment_target_output.GetDeploymentTargetOutput":
1727
+ """<p> Returns information about a deployment target. </p>
1728
+
1729
+ Args:
1730
+ deployment_id: <p> The unique ID of a deployment. </p>
1731
+ target_id: <p> The unique ID of a deployment target. </p>
1732
+
1733
+ Raises:
1734
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
1735
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
1736
+ capo_codedeploy.errors.deployment_not_started_exception.DeploymentNotStartedException: <p>The specified deployment has not started.</p>
1737
+ capo_codedeploy.errors.deployment_target_does_not_exist_exception.DeploymentTargetDoesNotExistException: <p> The provided target ID does not belong to the attempted deployment. </p>
1738
+ capo_codedeploy.errors.deployment_target_id_required_exception.DeploymentTargetIdRequiredException: <p> A deployment target ID was not provided. </p>
1739
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
1740
+ capo_codedeploy.errors.invalid_deployment_target_id_exception.InvalidDeploymentTargetIdException: <p> The target ID provided was not valid. </p>
1741
+ capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name was specified in an invalid format.</p>
1742
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1743
+ """
1744
+
1745
+ def _handler(
1746
+ req: "OperationRequest[capo_codedeploy.types.get_deployment_target_input.GetDeploymentTargetInput]",
1747
+ ) -> OperationResponse[
1748
+ "capo_codedeploy.types.get_deployment_target_output.GetDeploymentTargetOutput"
1749
+ ]:
1750
+ import capo_codedeploy._operations.code_deploy_20141006.get_deployment_target
1751
+
1752
+ output, http_response = (
1753
+ capo_codedeploy._operations.code_deploy_20141006.get_deployment_target.get_deployment_target(
1754
+ req.options, req.input
1755
+ )
1756
+ )
1757
+ return OperationResponse(output=output, response=http_response)
1758
+
1759
+ interceptors_, options_ = self.operation_options(config_overrides)
1760
+ input_: capo_codedeploy.types.get_deployment_target_input.GetDeploymentTargetInput = {
1761
+ "deployment_id": deployment_id,
1762
+ "target_id": target_id,
1763
+ }
1764
+
1765
+ response = execute_pipeline(
1766
+ OperationRequest(input=input_, options=options_),
1767
+ handler=_handler,
1768
+ interceptors=list(interceptors_),
1769
+ )
1770
+ response.response.close()
1771
+ return response.output
1772
+
1773
+ def get_on_premises_instance(
1774
+ self,
1775
+ instance_name: "capo_codedeploy.types.instance_name.InstanceName",
1776
+ *,
1777
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1778
+ ) -> "capo_codedeploy.types.get_on_premises_instance_output.GetOnPremisesInstanceOutput":
1779
+ """<p> Gets information about an on-premises instance. </p>
1780
+
1781
+ Args:
1782
+ instance_name: <p> The name of the on-premises instance about which to get information. </p>
1783
+
1784
+ Raises:
1785
+ capo_codedeploy.errors.instance_name_required_exception.InstanceNameRequiredException: <p>An on-premises instance name was not specified.</p>
1786
+ capo_codedeploy.errors.instance_not_registered_exception.InstanceNotRegisteredException: <p>The specified on-premises instance is not registered.</p>
1787
+ capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name was specified in an invalid format.</p>
1788
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1789
+ """
1790
+
1791
+ def _handler(
1792
+ req: "OperationRequest[capo_codedeploy.types.get_on_premises_instance_input.GetOnPremisesInstanceInput]",
1793
+ ) -> OperationResponse[
1794
+ "capo_codedeploy.types.get_on_premises_instance_output.GetOnPremisesInstanceOutput"
1795
+ ]:
1796
+ import capo_codedeploy._operations.code_deploy_20141006.get_on_premises_instance
1797
+
1798
+ output, http_response = (
1799
+ capo_codedeploy._operations.code_deploy_20141006.get_on_premises_instance.get_on_premises_instance(
1800
+ req.options, req.input
1801
+ )
1802
+ )
1803
+ return OperationResponse(output=output, response=http_response)
1804
+
1805
+ interceptors_, options_ = self.operation_options(config_overrides)
1806
+ input_: capo_codedeploy.types.get_on_premises_instance_input.GetOnPremisesInstanceInput = {
1807
+ "instance_name": instance_name
1808
+ }
1809
+
1810
+ response = execute_pipeline(
1811
+ OperationRequest(input=input_, options=options_),
1812
+ handler=_handler,
1813
+ interceptors=list(interceptors_),
1814
+ )
1815
+ response.response.close()
1816
+ return response.output
1817
+
1818
+ def list_application_revisions(
1819
+ self,
1820
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
1821
+ *,
1822
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1823
+ sort_by: Optional[
1824
+ "capo_codedeploy.types.application_revision_sort_by.ApplicationRevisionSortBy"
1825
+ ] = None,
1826
+ sort_order: Optional["capo_codedeploy.types.sort_order.SortOrder"] = None,
1827
+ s3_bucket: Optional["capo_codedeploy.types.s3_bucket.S3Bucket"] = None,
1828
+ s3_key_prefix: Optional["capo_codedeploy.types.s3_key.S3Key"] = None,
1829
+ deployed: Optional[
1830
+ "capo_codedeploy.types.list_state_filter_action.ListStateFilterAction"
1831
+ ] = None,
1832
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
1833
+ ) -> "capo_codedeploy.types.list_application_revisions_output.ListApplicationRevisionsOutput":
1834
+ """<p>Lists information about revisions for an application.</p>
1835
+
1836
+ Args:
1837
+ application_name: <p> The name of an CodeDeploy application associated with the user or Amazon Web Services account. </p>
1838
+ sort_by: <p>The column name to use to sort the list results:</p> <ul> <li> <p> <code>registerTime</code>: Sort by the time the revisions were registered with CodeDeploy.</p> </li> <li> <p> <code>firstUsedTime</code>: Sort by the time the revisions were first used in a deployment.</p> </li> <li> <p> <code>lastUsedTime</code>: Sort by the time the revisions were last used in a deployment.</p> </li> </ul> <p> If not specified or set to null, the results are returned in an arbitrary order. </p>
1839
+ sort_order: <p> The order in which to sort the list results: </p> <ul> <li> <p> <code>ascending</code>: ascending order.</p> </li> <li> <p> <code>descending</code>: descending order.</p> </li> </ul> <p>If not specified, the results are sorted in ascending order.</p> <p>If set to null, the results are sorted in an arbitrary order.</p>
1840
+ s3_bucket: <p> An Amazon S3 bucket name to limit the search for revisions. </p> <p> If set to null, all of the user's buckets are searched. </p>
1841
+ s3_key_prefix: <p> A key prefix for the set of Amazon S3 objects to limit the search for revisions. </p>
1842
+ deployed: <p> Whether to list revisions based on whether the revision is the target revision of a deployment group: </p> <ul> <li> <p> <code>include</code>: List revisions that are target revisions of a deployment group.</p> </li> <li> <p> <code>exclude</code>: Do not list revisions that are target revisions of a deployment group.</p> </li> <li> <p> <code>ignore</code>: List all revisions.</p> </li> </ul>
1843
+ next_token: <p>An identifier returned from the previous <code>ListApplicationRevisions</code> call. It can be used to return the next set of applications in the list.</p>
1844
+
1845
+ Raises:
1846
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
1847
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
1848
+ capo_codedeploy.errors.bucket_name_filter_required_exception.BucketNameFilterRequiredException: <p>A bucket name is required, but was not provided.</p>
1849
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
1850
+ capo_codedeploy.errors.invalid_bucket_name_filter_exception.InvalidBucketNameFilterException: <p>The bucket name either doesn't exist or was specified in an invalid format.</p>
1851
+ capo_codedeploy.errors.invalid_deployed_state_filter_exception.InvalidDeployedStateFilterException: <p>The deployed state filter was specified in an invalid format.</p>
1852
+ capo_codedeploy.errors.invalid_key_prefix_filter_exception.InvalidKeyPrefixFilterException: <p>The specified key prefix filter was specified in an invalid format.</p>
1853
+ capo_codedeploy.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The next token was specified in an invalid format.</p>
1854
+ capo_codedeploy.errors.invalid_sort_by_exception.InvalidSortByException: <p>The column name to sort by is either not present or was specified in an invalid format.</p>
1855
+ capo_codedeploy.errors.invalid_sort_order_exception.InvalidSortOrderException: <p>The sort order was specified in an invalid format.</p>
1856
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1857
+ """
1858
+
1859
+ def _handler(
1860
+ req: "OperationRequest[capo_codedeploy.types.list_application_revisions_input.ListApplicationRevisionsInput]",
1861
+ ) -> OperationResponse[
1862
+ "capo_codedeploy.types.list_application_revisions_output.ListApplicationRevisionsOutput"
1863
+ ]:
1864
+ import capo_codedeploy._operations.code_deploy_20141006.list_application_revisions
1865
+
1866
+ output, http_response = (
1867
+ capo_codedeploy._operations.code_deploy_20141006.list_application_revisions.list_application_revisions(
1868
+ req.options, req.input
1869
+ )
1870
+ )
1871
+ return OperationResponse(output=output, response=http_response)
1872
+
1873
+ interceptors_, options_ = self.operation_options(config_overrides)
1874
+ input_: capo_codedeploy.types.list_application_revisions_input.ListApplicationRevisionsInput = {
1875
+ "application_name": application_name
1876
+ }
1877
+ if sort_by is not None:
1878
+ input_["sort_by"] = sort_by
1879
+ if sort_order is not None:
1880
+ input_["sort_order"] = sort_order
1881
+ if s3_bucket is not None:
1882
+ input_["s3_bucket"] = s3_bucket
1883
+ if s3_key_prefix is not None:
1884
+ input_["s3_key_prefix"] = s3_key_prefix
1885
+ if deployed is not None:
1886
+ input_["deployed"] = deployed
1887
+ if next_token is not None:
1888
+ input_["next_token"] = next_token
1889
+
1890
+ response = execute_pipeline(
1891
+ OperationRequest(input=input_, options=options_),
1892
+ handler=_handler,
1893
+ interceptors=list(interceptors_),
1894
+ )
1895
+ response.response.close()
1896
+ return response.output
1897
+
1898
+ def iter_list_application_revisions(
1899
+ self,
1900
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
1901
+ *,
1902
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1903
+ sort_by: Optional[
1904
+ "capo_codedeploy.types.application_revision_sort_by.ApplicationRevisionSortBy"
1905
+ ] = None,
1906
+ sort_order: Optional["capo_codedeploy.types.sort_order.SortOrder"] = None,
1907
+ s3_bucket: Optional["capo_codedeploy.types.s3_bucket.S3Bucket"] = None,
1908
+ s3_key_prefix: Optional["capo_codedeploy.types.s3_key.S3Key"] = None,
1909
+ deployed: Optional[
1910
+ "capo_codedeploy.types.list_state_filter_action.ListStateFilterAction"
1911
+ ] = None,
1912
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
1913
+ ) -> "Iterator[capo_codedeploy.types.revision_location.RevisionLocation]":
1914
+ _token = next_token
1915
+ while True:
1916
+ _response = self.list_application_revisions(
1917
+ application_name,
1918
+ config_overrides=config_overrides,
1919
+ sort_by=sort_by,
1920
+ sort_order=sort_order,
1921
+ s3_bucket=s3_bucket,
1922
+ s3_key_prefix=s3_key_prefix,
1923
+ deployed=deployed,
1924
+ next_token=_token,
1925
+ )
1926
+ _page = _resolve_path(_response, ("revisions",))
1927
+ for _item in _page or []:
1928
+ yield _item
1929
+ _token = _resolve_path(_response, ("next_token",))
1930
+ if not _token:
1931
+ break
1932
+
1933
+ def list_applications(
1934
+ self,
1935
+ *,
1936
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1937
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
1938
+ ) -> "capo_codedeploy.types.list_applications_output.ListApplicationsOutput":
1939
+ """<p>Lists the applications registered with the user or Amazon Web Services account.</p>
1940
+
1941
+ Args:
1942
+ next_token: <p>An identifier returned from the previous list applications call. It can be used to return the next set of applications in the list.</p>
1943
+
1944
+ Raises:
1945
+ capo_codedeploy.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The next token was specified in an invalid format.</p>
1946
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
1947
+ """
1948
+
1949
+ def _handler(
1950
+ req: "OperationRequest[capo_codedeploy.types.list_applications_input.ListApplicationsInput]",
1951
+ ) -> OperationResponse[
1952
+ "capo_codedeploy.types.list_applications_output.ListApplicationsOutput"
1953
+ ]:
1954
+ import capo_codedeploy._operations.code_deploy_20141006.list_applications
1955
+
1956
+ output, http_response = (
1957
+ capo_codedeploy._operations.code_deploy_20141006.list_applications.list_applications(
1958
+ req.options, req.input
1959
+ )
1960
+ )
1961
+ return OperationResponse(output=output, response=http_response)
1962
+
1963
+ interceptors_, options_ = self.operation_options(config_overrides)
1964
+ input_: capo_codedeploy.types.list_applications_input.ListApplicationsInput = {}
1965
+ if next_token is not None:
1966
+ input_["next_token"] = next_token
1967
+
1968
+ response = execute_pipeline(
1969
+ OperationRequest(input=input_, options=options_),
1970
+ handler=_handler,
1971
+ interceptors=list(interceptors_),
1972
+ )
1973
+ response.response.close()
1974
+ return response.output
1975
+
1976
+ def iter_list_applications(
1977
+ self,
1978
+ *,
1979
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1980
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
1981
+ ) -> "Iterator[capo_codedeploy.types.application_name.ApplicationName]":
1982
+ _token = next_token
1983
+ while True:
1984
+ _response = self.list_applications(
1985
+ config_overrides=config_overrides,
1986
+ next_token=_token,
1987
+ )
1988
+ _page = _resolve_path(_response, ("applications",))
1989
+ for _item in _page or []:
1990
+ yield _item
1991
+ _token = _resolve_path(_response, ("next_token",))
1992
+ if not _token:
1993
+ break
1994
+
1995
+ def list_deployment_configs(
1996
+ self,
1997
+ *,
1998
+ config_overrides: Optional[CodeDeployClientConfig] = None,
1999
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2000
+ ) -> "capo_codedeploy.types.list_deployment_configs_output.ListDeploymentConfigsOutput":
2001
+ """<p>Lists the deployment configurations with the user or Amazon Web Services account.</p>
2002
+
2003
+ Args:
2004
+ next_token: <p>An identifier returned from the previous <code>ListDeploymentConfigs</code> call. It can be used to return the next set of deployment configurations in the list. </p>
2005
+
2006
+ Raises:
2007
+ capo_codedeploy.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The next token was specified in an invalid format.</p>
2008
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2009
+ """
2010
+
2011
+ def _handler(
2012
+ req: "OperationRequest[capo_codedeploy.types.list_deployment_configs_input.ListDeploymentConfigsInput]",
2013
+ ) -> OperationResponse[
2014
+ "capo_codedeploy.types.list_deployment_configs_output.ListDeploymentConfigsOutput"
2015
+ ]:
2016
+ import capo_codedeploy._operations.code_deploy_20141006.list_deployment_configs
2017
+
2018
+ output, http_response = (
2019
+ capo_codedeploy._operations.code_deploy_20141006.list_deployment_configs.list_deployment_configs(
2020
+ req.options, req.input
2021
+ )
2022
+ )
2023
+ return OperationResponse(output=output, response=http_response)
2024
+
2025
+ interceptors_, options_ = self.operation_options(config_overrides)
2026
+ input_: capo_codedeploy.types.list_deployment_configs_input.ListDeploymentConfigsInput = {}
2027
+ if next_token is not None:
2028
+ input_["next_token"] = next_token
2029
+
2030
+ response = execute_pipeline(
2031
+ OperationRequest(input=input_, options=options_),
2032
+ handler=_handler,
2033
+ interceptors=list(interceptors_),
2034
+ )
2035
+ response.response.close()
2036
+ return response.output
2037
+
2038
+ def iter_list_deployment_configs(
2039
+ self,
2040
+ *,
2041
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2042
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2043
+ ) -> "Iterator[capo_codedeploy.types.deployment_config_name.DeploymentConfigName]":
2044
+ _token = next_token
2045
+ while True:
2046
+ _response = self.list_deployment_configs(
2047
+ config_overrides=config_overrides,
2048
+ next_token=_token,
2049
+ )
2050
+ _page = _resolve_path(_response, ("deployment_configs_list",))
2051
+ for _item in _page or []:
2052
+ yield _item
2053
+ _token = _resolve_path(_response, ("next_token",))
2054
+ if not _token:
2055
+ break
2056
+
2057
+ def list_deployment_groups(
2058
+ self,
2059
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
2060
+ *,
2061
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2062
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2063
+ ) -> (
2064
+ "capo_codedeploy.types.list_deployment_groups_output.ListDeploymentGroupsOutput"
2065
+ ):
2066
+ """<p>Lists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account.</p>
2067
+
2068
+ Args:
2069
+ application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
2070
+ next_token: <p>An identifier returned from the previous list deployment groups call. It can be used to return the next set of deployment groups in the list.</p>
2071
+
2072
+ Raises:
2073
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
2074
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
2075
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
2076
+ capo_codedeploy.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The next token was specified in an invalid format.</p>
2077
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2078
+ """
2079
+
2080
+ def _handler(
2081
+ req: "OperationRequest[capo_codedeploy.types.list_deployment_groups_input.ListDeploymentGroupsInput]",
2082
+ ) -> OperationResponse[
2083
+ "capo_codedeploy.types.list_deployment_groups_output.ListDeploymentGroupsOutput"
2084
+ ]:
2085
+ import capo_codedeploy._operations.code_deploy_20141006.list_deployment_groups
2086
+
2087
+ output, http_response = (
2088
+ capo_codedeploy._operations.code_deploy_20141006.list_deployment_groups.list_deployment_groups(
2089
+ req.options, req.input
2090
+ )
2091
+ )
2092
+ return OperationResponse(output=output, response=http_response)
2093
+
2094
+ interceptors_, options_ = self.operation_options(config_overrides)
2095
+ input_: capo_codedeploy.types.list_deployment_groups_input.ListDeploymentGroupsInput = {
2096
+ "application_name": application_name
2097
+ }
2098
+ if next_token is not None:
2099
+ input_["next_token"] = next_token
2100
+
2101
+ response = execute_pipeline(
2102
+ OperationRequest(input=input_, options=options_),
2103
+ handler=_handler,
2104
+ interceptors=list(interceptors_),
2105
+ )
2106
+ response.response.close()
2107
+ return response.output
2108
+
2109
+ def iter_list_deployment_groups(
2110
+ self,
2111
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
2112
+ *,
2113
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2114
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2115
+ ) -> "Iterator[capo_codedeploy.types.deployment_group_name.DeploymentGroupName]":
2116
+ _token = next_token
2117
+ while True:
2118
+ _response = self.list_deployment_groups(
2119
+ application_name,
2120
+ config_overrides=config_overrides,
2121
+ next_token=_token,
2122
+ )
2123
+ _page = _resolve_path(_response, ("deployment_groups",))
2124
+ for _item in _page or []:
2125
+ yield _item
2126
+ _token = _resolve_path(_response, ("next_token",))
2127
+ if not _token:
2128
+ break
2129
+
2130
+ def list_deployment_instances(
2131
+ self,
2132
+ deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
2133
+ *,
2134
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2135
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2136
+ instance_status_filter: Optional[
2137
+ "capo_codedeploy.types.instance_status_list.InstanceStatusList"
2138
+ ] = None,
2139
+ instance_type_filter: Optional[
2140
+ "capo_codedeploy.types.instance_type_list.InstanceTypeList"
2141
+ ] = None,
2142
+ ) -> "capo_codedeploy.types.list_deployment_instances_output.ListDeploymentInstancesOutput":
2143
+ r"""<note> <p> The newer <code>BatchGetDeploymentTargets</code> should be used instead because it works with all compute types. <code>ListDeploymentInstances</code> throws an exception if it is used with a compute platform other than EC2/On-premises or Lambda. </p> </note> <p> Lists the instance for a deployment associated with the user or Amazon Web Services account. </p>
2144
+
2145
+ Args:
2146
+ deployment_id: <p> The unique ID of a deployment. </p>
2147
+ next_token: <p>An identifier returned from the previous list deployment instances call. It can be used to return the next set of deployment instances in the list.</p>
2148
+ instance_status_filter: <p>A subset of instances to list by status:</p> <ul> <li> <p> <code>Pending</code>: Include those instances with pending deployments.</p> </li> <li> <p> <code>InProgress</code>: Include those instances where deployments are still in progress.</p> </li> <li> <p> <code>Succeeded</code>: Include those instances with successful deployments.</p> </li> <li> <p> <code>Failed</code>: Include those instances with failed deployments.</p> </li> <li> <p> <code>Skipped</code>: Include those instances with skipped deployments.</p> </li> <li> <p> <code>Unknown</code>: Include those instances with deployments in an unknown state.</p> </li> </ul>
2149
+ instance_type_filter: <p>The set of instances in a blue/green deployment, either those in the original environment (\"BLUE\") or those in the replacement environment (\"GREEN\"), for which you want to view instance information.</p>
2150
+
2151
+ Raises:
2152
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
2153
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
2154
+ capo_codedeploy.errors.deployment_not_started_exception.DeploymentNotStartedException: <p>The specified deployment has not started.</p>
2155
+ capo_codedeploy.errors.invalid_compute_platform_exception.InvalidComputePlatformException: <p>The computePlatform is invalid. The computePlatform should be <code>Lambda</code>, <code>Server</code>, or <code>ECS</code>.</p>
2156
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
2157
+ capo_codedeploy.errors.invalid_deployment_instance_type_exception.InvalidDeploymentInstanceTypeException: <p>An instance type was specified for an in-place deployment. Instance types are supported for blue/green deployments only.</p>
2158
+ capo_codedeploy.errors.invalid_instance_status_exception.InvalidInstanceStatusException: <p>The specified instance status does not exist.</p>
2159
+ capo_codedeploy.errors.invalid_instance_type_exception.InvalidInstanceTypeException: <p>An invalid instance type was specified for instances in a blue/green deployment. Valid values include \"Blue\" for an original environment and \"Green\" for a replacement environment.</p>
2160
+ capo_codedeploy.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The next token was specified in an invalid format.</p>
2161
+ capo_codedeploy.errors.invalid_target_filter_name_exception.InvalidTargetFilterNameException: <p> The target filter name is invalid. </p>
2162
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2163
+ """
2164
+
2165
+ def _handler(
2166
+ req: "OperationRequest[capo_codedeploy.types.list_deployment_instances_input.ListDeploymentInstancesInput]",
2167
+ ) -> OperationResponse[
2168
+ "capo_codedeploy.types.list_deployment_instances_output.ListDeploymentInstancesOutput"
2169
+ ]:
2170
+ import capo_codedeploy._operations.code_deploy_20141006.list_deployment_instances
2171
+
2172
+ output, http_response = (
2173
+ capo_codedeploy._operations.code_deploy_20141006.list_deployment_instances.list_deployment_instances(
2174
+ req.options, req.input
2175
+ )
2176
+ )
2177
+ return OperationResponse(output=output, response=http_response)
2178
+
2179
+ interceptors_, options_ = self.operation_options(config_overrides)
2180
+ input_: capo_codedeploy.types.list_deployment_instances_input.ListDeploymentInstancesInput = {
2181
+ "deployment_id": deployment_id
2182
+ }
2183
+ if next_token is not None:
2184
+ input_["next_token"] = next_token
2185
+ if instance_status_filter is not None:
2186
+ input_["instance_status_filter"] = instance_status_filter
2187
+ if instance_type_filter is not None:
2188
+ input_["instance_type_filter"] = instance_type_filter
2189
+
2190
+ response = execute_pipeline(
2191
+ OperationRequest(input=input_, options=options_),
2192
+ handler=_handler,
2193
+ interceptors=list(interceptors_),
2194
+ )
2195
+ response.response.close()
2196
+ return response.output
2197
+
2198
+ def iter_list_deployment_instances(
2199
+ self,
2200
+ deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
2201
+ *,
2202
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2203
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2204
+ instance_status_filter: Optional[
2205
+ "capo_codedeploy.types.instance_status_list.InstanceStatusList"
2206
+ ] = None,
2207
+ instance_type_filter: Optional[
2208
+ "capo_codedeploy.types.instance_type_list.InstanceTypeList"
2209
+ ] = None,
2210
+ ) -> "Iterator[capo_codedeploy.types.instance_id.InstanceId]":
2211
+ _token = next_token
2212
+ while True:
2213
+ _response = self.list_deployment_instances(
2214
+ deployment_id,
2215
+ config_overrides=config_overrides,
2216
+ next_token=_token,
2217
+ instance_status_filter=instance_status_filter,
2218
+ instance_type_filter=instance_type_filter,
2219
+ )
2220
+ _page = _resolve_path(_response, ("instances_list",))
2221
+ for _item in _page or []:
2222
+ yield _item
2223
+ _token = _resolve_path(_response, ("next_token",))
2224
+ if not _token:
2225
+ break
2226
+
2227
+ def list_deployments(
2228
+ self,
2229
+ *,
2230
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2231
+ application_name: Optional[
2232
+ "capo_codedeploy.types.application_name.ApplicationName"
2233
+ ] = None,
2234
+ deployment_group_name: Optional[
2235
+ "capo_codedeploy.types.deployment_group_name.DeploymentGroupName"
2236
+ ] = None,
2237
+ external_id: Optional["capo_codedeploy.types.external_id.ExternalId"] = None,
2238
+ include_only_statuses: Optional[
2239
+ "capo_codedeploy.types.deployment_status_list.DeploymentStatusList"
2240
+ ] = None,
2241
+ create_time_range: Optional[
2242
+ "capo_codedeploy.types.time_range.TimeRange"
2243
+ ] = None,
2244
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2245
+ ) -> "capo_codedeploy.types.list_deployments_output.ListDeploymentsOutput":
2246
+ """<p>Lists the deployments in a deployment group for an application registered with the user or Amazon Web Services account.</p>
2247
+
2248
+ Args:
2249
+ application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p> <note> <p>If <code>applicationName</code> is specified, then <code>deploymentGroupName</code> must be specified. If it is not specified, then <code>deploymentGroupName</code> must not be specified. </p> </note>
2250
+ deployment_group_name: <p>The name of a deployment group for the specified application.</p> <note> <p>If <code>deploymentGroupName</code> is specified, then <code>applicationName</code> must be specified. If it is not specified, then <code>applicationName</code> must not be specified. </p> </note>
2251
+ external_id: <p>The unique ID of an external resource for returning deployments linked to the external resource.</p>
2252
+ include_only_statuses: <p>A subset of deployments to list by status:</p> <ul> <li> <p> <code>Created</code>: Include created deployments in the resulting list.</p> </li> <li> <p> <code>Queued</code>: Include queued deployments in the resulting list.</p> </li> <li> <p> <code>In Progress</code>: Include in-progress deployments in the resulting list.</p> </li> <li> <p> <code>Succeeded</code>: Include successful deployments in the resulting list.</p> </li> <li> <p> <code>Failed</code>: Include failed deployments in the resulting list.</p> </li> <li> <p> <code>Stopped</code>: Include stopped deployments in the resulting list.</p> </li> </ul>
2253
+ create_time_range: <p>A time range (start and end) for returning a subset of the list of deployments.</p>
2254
+ next_token: <p>An identifier returned from the previous list deployments call. It can be used to return the next set of deployments in the list.</p>
2255
+
2256
+ Raises:
2257
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
2258
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
2259
+ capo_codedeploy.errors.deployment_group_does_not_exist_exception.DeploymentGroupDoesNotExistException: <p>The named deployment group with the user or Amazon Web Services account does not exist.</p>
2260
+ capo_codedeploy.errors.deployment_group_name_required_exception.DeploymentGroupNameRequiredException: <p>The deployment group name was not specified.</p>
2261
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
2262
+ capo_codedeploy.errors.invalid_deployment_group_name_exception.InvalidDeploymentGroupNameException: <p>The deployment group name was specified in an invalid format.</p>
2263
+ capo_codedeploy.errors.invalid_deployment_status_exception.InvalidDeploymentStatusException: <p>The specified deployment status doesn't exist or cannot be determined.</p>
2264
+ capo_codedeploy.errors.invalid_external_id_exception.InvalidExternalIdException: <p>The external ID was specified in an invalid format.</p>
2265
+ capo_codedeploy.errors.invalid_input_exception.InvalidInputException: <p>The input was specified in an invalid format.</p>
2266
+ capo_codedeploy.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The next token was specified in an invalid format.</p>
2267
+ capo_codedeploy.errors.invalid_time_range_exception.InvalidTimeRangeException: <p>The specified time range was specified in an invalid format.</p>
2268
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2269
+ """
2270
+
2271
+ def _handler(
2272
+ req: "OperationRequest[capo_codedeploy.types.list_deployments_input.ListDeploymentsInput]",
2273
+ ) -> OperationResponse[
2274
+ "capo_codedeploy.types.list_deployments_output.ListDeploymentsOutput"
2275
+ ]:
2276
+ import capo_codedeploy._operations.code_deploy_20141006.list_deployments
2277
+
2278
+ output, http_response = (
2279
+ capo_codedeploy._operations.code_deploy_20141006.list_deployments.list_deployments(
2280
+ req.options, req.input
2281
+ )
2282
+ )
2283
+ return OperationResponse(output=output, response=http_response)
2284
+
2285
+ interceptors_, options_ = self.operation_options(config_overrides)
2286
+ input_: capo_codedeploy.types.list_deployments_input.ListDeploymentsInput = {}
2287
+ if application_name is not None:
2288
+ input_["application_name"] = application_name
2289
+ if deployment_group_name is not None:
2290
+ input_["deployment_group_name"] = deployment_group_name
2291
+ if external_id is not None:
2292
+ input_["external_id"] = external_id
2293
+ if include_only_statuses is not None:
2294
+ input_["include_only_statuses"] = include_only_statuses
2295
+ if create_time_range is not None:
2296
+ input_["create_time_range"] = create_time_range
2297
+ if next_token is not None:
2298
+ input_["next_token"] = next_token
2299
+
2300
+ response = execute_pipeline(
2301
+ OperationRequest(input=input_, options=options_),
2302
+ handler=_handler,
2303
+ interceptors=list(interceptors_),
2304
+ )
2305
+ response.response.close()
2306
+ return response.output
2307
+
2308
+ def iter_list_deployments(
2309
+ self,
2310
+ *,
2311
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2312
+ application_name: Optional[
2313
+ "capo_codedeploy.types.application_name.ApplicationName"
2314
+ ] = None,
2315
+ deployment_group_name: Optional[
2316
+ "capo_codedeploy.types.deployment_group_name.DeploymentGroupName"
2317
+ ] = None,
2318
+ external_id: Optional["capo_codedeploy.types.external_id.ExternalId"] = None,
2319
+ include_only_statuses: Optional[
2320
+ "capo_codedeploy.types.deployment_status_list.DeploymentStatusList"
2321
+ ] = None,
2322
+ create_time_range: Optional[
2323
+ "capo_codedeploy.types.time_range.TimeRange"
2324
+ ] = None,
2325
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2326
+ ) -> "Iterator[capo_codedeploy.types.deployment_id.DeploymentId]":
2327
+ _token = next_token
2328
+ while True:
2329
+ _response = self.list_deployments(
2330
+ config_overrides=config_overrides,
2331
+ application_name=application_name,
2332
+ deployment_group_name=deployment_group_name,
2333
+ external_id=external_id,
2334
+ include_only_statuses=include_only_statuses,
2335
+ create_time_range=create_time_range,
2336
+ next_token=_token,
2337
+ )
2338
+ _page = _resolve_path(_response, ("deployments",))
2339
+ for _item in _page or []:
2340
+ yield _item
2341
+ _token = _resolve_path(_response, ("next_token",))
2342
+ if not _token:
2343
+ break
2344
+
2345
+ def list_deployment_targets(
2346
+ self,
2347
+ deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
2348
+ *,
2349
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2350
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2351
+ target_filters: Optional[
2352
+ "capo_codedeploy.types.target_filters.TargetFilters"
2353
+ ] = None,
2354
+ ) -> "capo_codedeploy.types.list_deployment_targets_output.ListDeploymentTargetsOutput":
2355
+ """<p> Returns an array of target IDs that are associated a deployment. </p>
2356
+
2357
+ Args:
2358
+ deployment_id: <p> The unique ID of a deployment. </p>
2359
+ next_token: <p> A token identifier returned from the previous <code>ListDeploymentTargets</code> call. It can be used to return the next set of deployment targets in the list. </p>
2360
+ target_filters: <p> A key used to filter the returned targets. The two valid values are:</p> <ul> <li> <p> <code>TargetStatus</code> - A <code>TargetStatus</code> filter string can be <code>Failed</code>, <code>InProgress</code>, <code>Pending</code>, <code>Ready</code>, <code>Skipped</code>, <code>Succeeded</code>, or <code>Unknown</code>. </p> </li> <li> <p> <code>ServerInstanceLabel</code> - A <code>ServerInstanceLabel</code> filter string can be <code>Blue</code> or <code>Green</code>. </p> </li> </ul>
2361
+
2362
+ Raises:
2363
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
2364
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
2365
+ capo_codedeploy.errors.deployment_not_started_exception.DeploymentNotStartedException: <p>The specified deployment has not started.</p>
2366
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
2367
+ capo_codedeploy.errors.invalid_deployment_instance_type_exception.InvalidDeploymentInstanceTypeException: <p>An instance type was specified for an in-place deployment. Instance types are supported for blue/green deployments only.</p>
2368
+ capo_codedeploy.errors.invalid_instance_status_exception.InvalidInstanceStatusException: <p>The specified instance status does not exist.</p>
2369
+ capo_codedeploy.errors.invalid_instance_type_exception.InvalidInstanceTypeException: <p>An invalid instance type was specified for instances in a blue/green deployment. Valid values include \"Blue\" for an original environment and \"Green\" for a replacement environment.</p>
2370
+ capo_codedeploy.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The next token was specified in an invalid format.</p>
2371
+ capo_codedeploy.errors.invalid_target_filter_name_exception.InvalidTargetFilterNameException: <p> The target filter name is invalid. </p>
2372
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2373
+ """
2374
+
2375
+ def _handler(
2376
+ req: "OperationRequest[capo_codedeploy.types.list_deployment_targets_input.ListDeploymentTargetsInput]",
2377
+ ) -> OperationResponse[
2378
+ "capo_codedeploy.types.list_deployment_targets_output.ListDeploymentTargetsOutput"
2379
+ ]:
2380
+ import capo_codedeploy._operations.code_deploy_20141006.list_deployment_targets
2381
+
2382
+ output, http_response = (
2383
+ capo_codedeploy._operations.code_deploy_20141006.list_deployment_targets.list_deployment_targets(
2384
+ req.options, req.input
2385
+ )
2386
+ )
2387
+ return OperationResponse(output=output, response=http_response)
2388
+
2389
+ interceptors_, options_ = self.operation_options(config_overrides)
2390
+ input_: capo_codedeploy.types.list_deployment_targets_input.ListDeploymentTargetsInput = {
2391
+ "deployment_id": deployment_id
2392
+ }
2393
+ if next_token is not None:
2394
+ input_["next_token"] = next_token
2395
+ if target_filters is not None:
2396
+ input_["target_filters"] = target_filters
2397
+
2398
+ response = execute_pipeline(
2399
+ OperationRequest(input=input_, options=options_),
2400
+ handler=_handler,
2401
+ interceptors=list(interceptors_),
2402
+ )
2403
+ response.response.close()
2404
+ return response.output
2405
+
2406
+ def list_git_hub_account_token_names(
2407
+ self,
2408
+ *,
2409
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2410
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2411
+ ) -> "capo_codedeploy.types.list_git_hub_account_token_names_output.ListGitHubAccountTokenNamesOutput":
2412
+ """<p>Lists the names of stored connections to GitHub accounts.</p>
2413
+
2414
+ Args:
2415
+ next_token: <p>An identifier returned from the previous <code>ListGitHubAccountTokenNames</code> call. It can be used to return the next set of names in the list. </p>
2416
+
2417
+ Raises:
2418
+ capo_codedeploy.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The next token was specified in an invalid format.</p>
2419
+ capo_codedeploy.errors.operation_not_supported_exception.OperationNotSupportedException: <p>The API used does not support the deployment.</p>
2420
+ capo_codedeploy.errors.resource_validation_exception.ResourceValidationException: <p>The specified resource could not be validated.</p>
2421
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2422
+ """
2423
+
2424
+ def _handler(
2425
+ req: "OperationRequest[capo_codedeploy.types.list_git_hub_account_token_names_input.ListGitHubAccountTokenNamesInput]",
2426
+ ) -> OperationResponse[
2427
+ "capo_codedeploy.types.list_git_hub_account_token_names_output.ListGitHubAccountTokenNamesOutput"
2428
+ ]:
2429
+ import capo_codedeploy._operations.code_deploy_20141006.list_git_hub_account_token_names
2430
+
2431
+ output, http_response = (
2432
+ capo_codedeploy._operations.code_deploy_20141006.list_git_hub_account_token_names.list_git_hub_account_token_names(
2433
+ req.options, req.input
2434
+ )
2435
+ )
2436
+ return OperationResponse(output=output, response=http_response)
2437
+
2438
+ interceptors_, options_ = self.operation_options(config_overrides)
2439
+ input_: capo_codedeploy.types.list_git_hub_account_token_names_input.ListGitHubAccountTokenNamesInput = {}
2440
+ if next_token is not None:
2441
+ input_["next_token"] = next_token
2442
+
2443
+ response = execute_pipeline(
2444
+ OperationRequest(input=input_, options=options_),
2445
+ handler=_handler,
2446
+ interceptors=list(interceptors_),
2447
+ )
2448
+ response.response.close()
2449
+ return response.output
2450
+
2451
+ def list_on_premises_instances(
2452
+ self,
2453
+ *,
2454
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2455
+ registration_status: Optional[
2456
+ "capo_codedeploy.types.registration_status.RegistrationStatus"
2457
+ ] = None,
2458
+ tag_filters: Optional[
2459
+ "capo_codedeploy.types.tag_filter_list.TagFilterList"
2460
+ ] = None,
2461
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2462
+ ) -> "capo_codedeploy.types.list_on_premises_instances_output.ListOnPremisesInstancesOutput":
2463
+ """<p>Gets a list of names for one or more on-premises instances.</p> <p>Unless otherwise specified, both registered and deregistered on-premises instance names are listed. To list only registered or deregistered on-premises instance names, use the registration status parameter.</p>
2464
+
2465
+ Args:
2466
+ registration_status: <p>The registration status of the on-premises instances:</p> <ul> <li> <p> <code>Deregistered</code>: Include deregistered on-premises instances in the resulting list.</p> </li> <li> <p> <code>Registered</code>: Include registered on-premises instances in the resulting list.</p> </li> </ul>
2467
+ tag_filters: <p>The on-premises instance tags that are used to restrict the on-premises instance names returned.</p>
2468
+ next_token: <p>An identifier returned from the previous list on-premises instances call. It can be used to return the next set of on-premises instances in the list.</p>
2469
+
2470
+ Raises:
2471
+ capo_codedeploy.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The next token was specified in an invalid format.</p>
2472
+ capo_codedeploy.errors.invalid_registration_status_exception.InvalidRegistrationStatusException: <p>The registration status was specified in an invalid format.</p>
2473
+ capo_codedeploy.errors.invalid_tag_filter_exception.InvalidTagFilterException: <p>The tag filter was specified in an invalid format.</p>
2474
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2475
+ """
2476
+
2477
+ def _handler(
2478
+ req: "OperationRequest[capo_codedeploy.types.list_on_premises_instances_input.ListOnPremisesInstancesInput]",
2479
+ ) -> OperationResponse[
2480
+ "capo_codedeploy.types.list_on_premises_instances_output.ListOnPremisesInstancesOutput"
2481
+ ]:
2482
+ import capo_codedeploy._operations.code_deploy_20141006.list_on_premises_instances
2483
+
2484
+ output, http_response = (
2485
+ capo_codedeploy._operations.code_deploy_20141006.list_on_premises_instances.list_on_premises_instances(
2486
+ req.options, req.input
2487
+ )
2488
+ )
2489
+ return OperationResponse(output=output, response=http_response)
2490
+
2491
+ interceptors_, options_ = self.operation_options(config_overrides)
2492
+ input_: capo_codedeploy.types.list_on_premises_instances_input.ListOnPremisesInstancesInput = {}
2493
+ if registration_status is not None:
2494
+ input_["registration_status"] = registration_status
2495
+ if tag_filters is not None:
2496
+ input_["tag_filters"] = tag_filters
2497
+ if next_token is not None:
2498
+ input_["next_token"] = next_token
2499
+
2500
+ response = execute_pipeline(
2501
+ OperationRequest(input=input_, options=options_),
2502
+ handler=_handler,
2503
+ interceptors=list(interceptors_),
2504
+ )
2505
+ response.response.close()
2506
+ return response.output
2507
+
2508
+ def list_tags_for_resource(
2509
+ self,
2510
+ resource_arn: "capo_codedeploy.types.arn.Arn",
2511
+ *,
2512
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2513
+ next_token: Optional["capo_codedeploy.types.next_token.NextToken"] = None,
2514
+ ) -> (
2515
+ "capo_codedeploy.types.list_tags_for_resource_output.ListTagsForResourceOutput"
2516
+ ):
2517
+ """<p> Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN). Tags are used to organize and categorize your CodeDeploy resources. </p>
2518
+
2519
+ Args:
2520
+ resource_arn: <p> The ARN of a CodeDeploy resource. <code>ListTagsForResource</code> returns all the tags associated with the resource that is identified by the <code>ResourceArn</code>. </p>
2521
+ next_token: <p>An identifier returned from the previous <code>ListTagsForResource</code> call. It can be used to return the next set of applications in the list.</p>
2522
+
2523
+ Raises:
2524
+ capo_codedeploy.errors.arn_not_supported_exception.ArnNotSupportedException: <p> The specified ARN is not supported. For example, it might be an ARN for a resource that is not expected. </p>
2525
+ capo_codedeploy.errors.invalid_arn_exception.InvalidArnException: <p> The specified ARN is not in a valid format. </p>
2526
+ capo_codedeploy.errors.resource_arn_required_exception.ResourceArnRequiredException: <p> The ARN of a resource is required, but was not found. </p>
2527
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2528
+ """
2529
+
2530
+ def _handler(
2531
+ req: "OperationRequest[capo_codedeploy.types.list_tags_for_resource_input.ListTagsForResourceInput]",
2532
+ ) -> OperationResponse[
2533
+ "capo_codedeploy.types.list_tags_for_resource_output.ListTagsForResourceOutput"
2534
+ ]:
2535
+ import capo_codedeploy._operations.code_deploy_20141006.list_tags_for_resource
2536
+
2537
+ output, http_response = (
2538
+ capo_codedeploy._operations.code_deploy_20141006.list_tags_for_resource.list_tags_for_resource(
2539
+ req.options, req.input
2540
+ )
2541
+ )
2542
+ return OperationResponse(output=output, response=http_response)
2543
+
2544
+ interceptors_, options_ = self.operation_options(config_overrides)
2545
+ input_: capo_codedeploy.types.list_tags_for_resource_input.ListTagsForResourceInput = {
2546
+ "resource_arn": resource_arn
2547
+ }
2548
+ if next_token is not None:
2549
+ input_["next_token"] = next_token
2550
+
2551
+ response = execute_pipeline(
2552
+ OperationRequest(input=input_, options=options_),
2553
+ handler=_handler,
2554
+ interceptors=list(interceptors_),
2555
+ )
2556
+ response.response.close()
2557
+ return response.output
2558
+
2559
+ def put_lifecycle_event_hook_execution_status(
2560
+ self,
2561
+ *,
2562
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2563
+ deployment_id: Optional[
2564
+ "capo_codedeploy.types.deployment_id.DeploymentId"
2565
+ ] = None,
2566
+ lifecycle_event_hook_execution_id: Optional[
2567
+ "capo_codedeploy.types.lifecycle_event_hook_execution_id.LifecycleEventHookExecutionId"
2568
+ ] = None,
2569
+ status: Optional[
2570
+ "capo_codedeploy.types.lifecycle_event_status.LifecycleEventStatus"
2571
+ ] = None,
2572
+ ) -> "capo_codedeploy.types.put_lifecycle_event_hook_execution_status_output.PutLifecycleEventHookExecutionStatusOutput":
2573
+ r"""<p> Sets the result of a Lambda validation function. The function validates lifecycle hooks during a deployment that uses the Lambda or Amazon ECS compute platform. For Lambda deployments, the available lifecycle hooks are <code>BeforeAllowTraffic</code> and <code>AfterAllowTraffic</code>. For Amazon ECS deployments, the available lifecycle hooks are <code>BeforeInstall</code>, <code>AfterInstall</code>, <code>AfterAllowTestTraffic</code>, <code>BeforeAllowTraffic</code>, and <code>AfterAllowTraffic</code>. Lambda validation functions return <code>Succeeded</code> or <code>Failed</code>. For more information, see <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-lambda\">AppSpec 'hooks' Section for an Lambda Deployment </a> and <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs\">AppSpec 'hooks' Section for an Amazon ECS Deployment</a>.</p>
2574
+
2575
+ Args:
2576
+ deployment_id: <p> The unique ID of a deployment. Pass this ID to a Lambda function that validates a deployment lifecycle event. </p>
2577
+ lifecycle_event_hook_execution_id: <p> The execution ID of a deployment's lifecycle hook. A deployment lifecycle hook is specified in the <code>hooks</code> section of the AppSpec file. </p>
2578
+ status: <p>The result of a Lambda function that validates a deployment lifecycle event. The values listed in <b>Valid Values</b> are valid for lifecycle statuses in general; however, only <code>Succeeded</code> and <code>Failed</code> can be passed successfully in your API call.</p>
2579
+
2580
+ Raises:
2581
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
2582
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
2583
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
2584
+ capo_codedeploy.errors.invalid_lifecycle_event_hook_execution_id_exception.InvalidLifecycleEventHookExecutionIdException: <p>A lifecycle event hook is invalid. Review the <code>hooks</code> section in your AppSpec file to ensure the lifecycle events and <code>hooks</code> functions are valid.</p>
2585
+ capo_codedeploy.errors.invalid_lifecycle_event_hook_execution_status_exception.InvalidLifecycleEventHookExecutionStatusException: <p>The result of a Lambda validation function that verifies a lifecycle event is invalid. It should return <code>Succeeded</code> or <code>Failed</code>.</p>
2586
+ capo_codedeploy.errors.lifecycle_event_already_completed_exception.LifecycleEventAlreadyCompletedException: <p>An attempt to return the status of an already completed lifecycle event occurred.</p>
2587
+ capo_codedeploy.errors.unsupported_action_for_deployment_type_exception.UnsupportedActionForDeploymentTypeException: <p>A call was submitted that is not supported for the specified deployment type.</p>
2588
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2589
+ """
2590
+
2591
+ def _handler(
2592
+ req: "OperationRequest[capo_codedeploy.types.put_lifecycle_event_hook_execution_status_input.PutLifecycleEventHookExecutionStatusInput]",
2593
+ ) -> OperationResponse[
2594
+ "capo_codedeploy.types.put_lifecycle_event_hook_execution_status_output.PutLifecycleEventHookExecutionStatusOutput"
2595
+ ]:
2596
+ import capo_codedeploy._operations.code_deploy_20141006.put_lifecycle_event_hook_execution_status
2597
+
2598
+ output, http_response = (
2599
+ capo_codedeploy._operations.code_deploy_20141006.put_lifecycle_event_hook_execution_status.put_lifecycle_event_hook_execution_status(
2600
+ req.options, req.input
2601
+ )
2602
+ )
2603
+ return OperationResponse(output=output, response=http_response)
2604
+
2605
+ interceptors_, options_ = self.operation_options(config_overrides)
2606
+ input_: capo_codedeploy.types.put_lifecycle_event_hook_execution_status_input.PutLifecycleEventHookExecutionStatusInput = {}
2607
+ if deployment_id is not None:
2608
+ input_["deployment_id"] = deployment_id
2609
+ if lifecycle_event_hook_execution_id is not None:
2610
+ input_["lifecycle_event_hook_execution_id"] = (
2611
+ lifecycle_event_hook_execution_id
2612
+ )
2613
+ if status is not None:
2614
+ input_["status"] = status
2615
+
2616
+ response = execute_pipeline(
2617
+ OperationRequest(input=input_, options=options_),
2618
+ handler=_handler,
2619
+ interceptors=list(interceptors_),
2620
+ )
2621
+ response.response.close()
2622
+ return response.output
2623
+
2624
+ def register_application_revision(
2625
+ self,
2626
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
2627
+ revision: "capo_codedeploy.types.revision_location.RevisionLocation",
2628
+ *,
2629
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2630
+ description: Optional["capo_codedeploy.types.description.Description"] = None,
2631
+ ) -> None:
2632
+ """<p>Registers with CodeDeploy a revision for the specified application.</p>
2633
+
2634
+ Args:
2635
+ application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
2636
+ description: <p>A comment about the revision.</p>
2637
+ revision: <p>Information about the application revision to register, including type and location.</p>
2638
+
2639
+ Raises:
2640
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
2641
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
2642
+ capo_codedeploy.errors.description_too_long_exception.DescriptionTooLongException: <p>The description is too long.</p>
2643
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
2644
+ capo_codedeploy.errors.invalid_revision_exception.InvalidRevisionException: <p>The revision was specified in an invalid format.</p>
2645
+ capo_codedeploy.errors.revision_required_exception.RevisionRequiredException: <p>The revision ID was not specified.</p>
2646
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2647
+ """
2648
+
2649
+ def _handler(
2650
+ req: "OperationRequest[capo_codedeploy.types.register_application_revision_input.RegisterApplicationRevisionInput]",
2651
+ ) -> OperationResponse[None]:
2652
+ import capo_codedeploy._operations.code_deploy_20141006.register_application_revision
2653
+
2654
+ output, http_response = (
2655
+ capo_codedeploy._operations.code_deploy_20141006.register_application_revision.register_application_revision(
2656
+ req.options, req.input
2657
+ )
2658
+ )
2659
+ return OperationResponse(output=output, response=http_response)
2660
+
2661
+ interceptors_, options_ = self.operation_options(config_overrides)
2662
+ input_: capo_codedeploy.types.register_application_revision_input.RegisterApplicationRevisionInput = {
2663
+ "application_name": application_name,
2664
+ "revision": revision,
2665
+ }
2666
+ if description is not None:
2667
+ input_["description"] = description
2668
+
2669
+ response = execute_pipeline(
2670
+ OperationRequest(input=input_, options=options_),
2671
+ handler=_handler,
2672
+ interceptors=list(interceptors_),
2673
+ )
2674
+ response.response.close()
2675
+ return response.output
2676
+
2677
+ def register_on_premises_instance(
2678
+ self,
2679
+ instance_name: "capo_codedeploy.types.instance_name.InstanceName",
2680
+ *,
2681
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2682
+ iam_session_arn: Optional[
2683
+ "capo_codedeploy.types.iam_session_arn.IamSessionArn"
2684
+ ] = None,
2685
+ iam_user_arn: Optional["capo_codedeploy.types.iam_user_arn.IamUserArn"] = None,
2686
+ ) -> None:
2687
+ """<p>Registers an on-premises instance.</p> <note> <p>Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request. You cannot use both.</p> </note>
2688
+
2689
+ Args:
2690
+ instance_name: <p>The name of the on-premises instance to register.</p>
2691
+ iam_session_arn: <p>The ARN of the IAM session to associate with the on-premises instance.</p>
2692
+ iam_user_arn: <p>The ARN of the user to associate with the on-premises instance.</p>
2693
+
2694
+ Raises:
2695
+ capo_codedeploy.errors.iam_arn_required_exception.IamArnRequiredException: <p>No IAM ARN was included in the request. You must use an IAM session ARN or user ARN in the request.</p>
2696
+ capo_codedeploy.errors.iam_session_arn_already_registered_exception.IamSessionArnAlreadyRegisteredException: <p>The request included an IAM session ARN that has already been used to register a different instance.</p>
2697
+ capo_codedeploy.errors.iam_user_arn_already_registered_exception.IamUserArnAlreadyRegisteredException: <p>The specified user ARN is already registered with an on-premises instance.</p>
2698
+ capo_codedeploy.errors.iam_user_arn_required_exception.IamUserArnRequiredException: <p>An user ARN was not specified.</p>
2699
+ capo_codedeploy.errors.instance_name_already_registered_exception.InstanceNameAlreadyRegisteredException: <p>The specified on-premises instance name is already registered.</p>
2700
+ capo_codedeploy.errors.instance_name_required_exception.InstanceNameRequiredException: <p>An on-premises instance name was not specified.</p>
2701
+ capo_codedeploy.errors.invalid_iam_session_arn_exception.InvalidIamSessionArnException: <p>The IAM session ARN was specified in an invalid format.</p>
2702
+ capo_codedeploy.errors.invalid_iam_user_arn_exception.InvalidIamUserArnException: <p>The user ARN was specified in an invalid format.</p>
2703
+ capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name was specified in an invalid format.</p>
2704
+ capo_codedeploy.errors.multiple_iam_arns_provided_exception.MultipleIamArnsProvidedException: <p>Both an user ARN and an IAM session ARN were included in the request. Use only one ARN type.</p>
2705
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2706
+ """
2707
+
2708
+ def _handler(
2709
+ req: "OperationRequest[capo_codedeploy.types.register_on_premises_instance_input.RegisterOnPremisesInstanceInput]",
2710
+ ) -> OperationResponse[None]:
2711
+ import capo_codedeploy._operations.code_deploy_20141006.register_on_premises_instance
2712
+
2713
+ output, http_response = (
2714
+ capo_codedeploy._operations.code_deploy_20141006.register_on_premises_instance.register_on_premises_instance(
2715
+ req.options, req.input
2716
+ )
2717
+ )
2718
+ return OperationResponse(output=output, response=http_response)
2719
+
2720
+ interceptors_, options_ = self.operation_options(config_overrides)
2721
+ input_: capo_codedeploy.types.register_on_premises_instance_input.RegisterOnPremisesInstanceInput = {
2722
+ "instance_name": instance_name
2723
+ }
2724
+ if iam_session_arn is not None:
2725
+ input_["iam_session_arn"] = iam_session_arn
2726
+ if iam_user_arn is not None:
2727
+ input_["iam_user_arn"] = iam_user_arn
2728
+
2729
+ response = execute_pipeline(
2730
+ OperationRequest(input=input_, options=options_),
2731
+ handler=_handler,
2732
+ interceptors=list(interceptors_),
2733
+ )
2734
+ response.response.close()
2735
+ return response.output
2736
+
2737
+ def remove_tags_from_on_premises_instances(
2738
+ self,
2739
+ tags: "capo_codedeploy.types.tag_list.TagList",
2740
+ instance_names: "capo_codedeploy.types.instance_name_list.InstanceNameList",
2741
+ *,
2742
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2743
+ ) -> None:
2744
+ """<p>Removes one or more tags from one or more on-premises instances.</p>
2745
+
2746
+ Args:
2747
+ tags: <p>The tag key-value pairs to remove from the on-premises instances.</p>
2748
+ instance_names: <p>The names of the on-premises instances from which to remove tags.</p>
2749
+
2750
+ Raises:
2751
+ capo_codedeploy.errors.instance_limit_exceeded_exception.InstanceLimitExceededException: <p>The maximum number of allowed on-premises instances in a single call was exceeded.</p>
2752
+ capo_codedeploy.errors.instance_name_required_exception.InstanceNameRequiredException: <p>An on-premises instance name was not specified.</p>
2753
+ capo_codedeploy.errors.instance_not_registered_exception.InstanceNotRegisteredException: <p>The specified on-premises instance is not registered.</p>
2754
+ capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name was specified in an invalid format.</p>
2755
+ capo_codedeploy.errors.invalid_tag_exception.InvalidTagException: <p>The tag was specified in an invalid format.</p>
2756
+ capo_codedeploy.errors.tag_limit_exceeded_exception.TagLimitExceededException: <p>The maximum allowed number of tags was exceeded.</p>
2757
+ capo_codedeploy.errors.tag_required_exception.TagRequiredException: <p>A tag was not specified.</p>
2758
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2759
+ """
2760
+
2761
+ def _handler(
2762
+ req: "OperationRequest[capo_codedeploy.types.remove_tags_from_on_premises_instances_input.RemoveTagsFromOnPremisesInstancesInput]",
2763
+ ) -> OperationResponse[None]:
2764
+ import capo_codedeploy._operations.code_deploy_20141006.remove_tags_from_on_premises_instances
2765
+
2766
+ output, http_response = (
2767
+ capo_codedeploy._operations.code_deploy_20141006.remove_tags_from_on_premises_instances.remove_tags_from_on_premises_instances(
2768
+ req.options, req.input
2769
+ )
2770
+ )
2771
+ return OperationResponse(output=output, response=http_response)
2772
+
2773
+ interceptors_, options_ = self.operation_options(config_overrides)
2774
+ input_: capo_codedeploy.types.remove_tags_from_on_premises_instances_input.RemoveTagsFromOnPremisesInstancesInput = {
2775
+ "tags": tags,
2776
+ "instance_names": instance_names,
2777
+ }
2778
+
2779
+ response = execute_pipeline(
2780
+ OperationRequest(input=input_, options=options_),
2781
+ handler=_handler,
2782
+ interceptors=list(interceptors_),
2783
+ )
2784
+ response.response.close()
2785
+ return response.output
2786
+
2787
+ def skip_wait_time_for_instance_termination(
2788
+ self,
2789
+ *,
2790
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2791
+ deployment_id: Optional[
2792
+ "capo_codedeploy.types.deployment_id.DeploymentId"
2793
+ ] = None,
2794
+ ) -> None:
2795
+ """<p>In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete.</p>
2796
+
2797
+ Args:
2798
+ deployment_id: <p> The unique ID of a blue/green deployment for which you want to skip the instance termination wait time. </p>
2799
+
2800
+ Raises:
2801
+ capo_codedeploy.errors.deployment_already_completed_exception.DeploymentAlreadyCompletedException: <p>The deployment is already complete.</p>
2802
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
2803
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
2804
+ capo_codedeploy.errors.deployment_not_started_exception.DeploymentNotStartedException: <p>The specified deployment has not started.</p>
2805
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
2806
+ capo_codedeploy.errors.unsupported_action_for_deployment_type_exception.UnsupportedActionForDeploymentTypeException: <p>A call was submitted that is not supported for the specified deployment type.</p>
2807
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2808
+ """
2809
+
2810
+ def _handler(
2811
+ req: "OperationRequest[capo_codedeploy.types.skip_wait_time_for_instance_termination_input.SkipWaitTimeForInstanceTerminationInput]",
2812
+ ) -> OperationResponse[None]:
2813
+ import capo_codedeploy._operations.code_deploy_20141006.skip_wait_time_for_instance_termination
2814
+
2815
+ output, http_response = (
2816
+ capo_codedeploy._operations.code_deploy_20141006.skip_wait_time_for_instance_termination.skip_wait_time_for_instance_termination(
2817
+ req.options, req.input
2818
+ )
2819
+ )
2820
+ return OperationResponse(output=output, response=http_response)
2821
+
2822
+ interceptors_, options_ = self.operation_options(config_overrides)
2823
+ input_: capo_codedeploy.types.skip_wait_time_for_instance_termination_input.SkipWaitTimeForInstanceTerminationInput = {}
2824
+ if deployment_id is not None:
2825
+ input_["deployment_id"] = deployment_id
2826
+
2827
+ response = execute_pipeline(
2828
+ OperationRequest(input=input_, options=options_),
2829
+ handler=_handler,
2830
+ interceptors=list(interceptors_),
2831
+ )
2832
+ response.response.close()
2833
+ return response.output
2834
+
2835
+ def stop_deployment(
2836
+ self,
2837
+ deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
2838
+ *,
2839
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2840
+ auto_rollback_enabled: Optional[
2841
+ "capo_codedeploy.types.nullable_boolean.NullableBoolean"
2842
+ ] = None,
2843
+ ) -> "capo_codedeploy.types.stop_deployment_output.StopDeploymentOutput":
2844
+ """<p>Attempts to stop an ongoing deployment.</p>
2845
+
2846
+ Args:
2847
+ deployment_id: <p> The unique ID of a deployment. </p>
2848
+ auto_rollback_enabled: <p> Indicates, when a deployment is stopped, whether instances that have been updated should be rolled back to the previous version of the application revision. </p>
2849
+
2850
+ Raises:
2851
+ capo_codedeploy.errors.deployment_already_completed_exception.DeploymentAlreadyCompletedException: <p>The deployment is already complete.</p>
2852
+ capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
2853
+ capo_codedeploy.errors.deployment_group_does_not_exist_exception.DeploymentGroupDoesNotExistException: <p>The named deployment group with the user or Amazon Web Services account does not exist.</p>
2854
+ capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
2855
+ capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
2856
+ capo_codedeploy.errors.unsupported_action_for_deployment_type_exception.UnsupportedActionForDeploymentTypeException: <p>A call was submitted that is not supported for the specified deployment type.</p>
2857
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2858
+ """
2859
+
2860
+ def _handler(
2861
+ req: "OperationRequest[capo_codedeploy.types.stop_deployment_input.StopDeploymentInput]",
2862
+ ) -> OperationResponse[
2863
+ "capo_codedeploy.types.stop_deployment_output.StopDeploymentOutput"
2864
+ ]:
2865
+ import capo_codedeploy._operations.code_deploy_20141006.stop_deployment
2866
+
2867
+ output, http_response = (
2868
+ capo_codedeploy._operations.code_deploy_20141006.stop_deployment.stop_deployment(
2869
+ req.options, req.input
2870
+ )
2871
+ )
2872
+ return OperationResponse(output=output, response=http_response)
2873
+
2874
+ interceptors_, options_ = self.operation_options(config_overrides)
2875
+ input_: capo_codedeploy.types.stop_deployment_input.StopDeploymentInput = {
2876
+ "deployment_id": deployment_id
2877
+ }
2878
+ if auto_rollback_enabled is not None:
2879
+ input_["auto_rollback_enabled"] = auto_rollback_enabled
2880
+
2881
+ response = execute_pipeline(
2882
+ OperationRequest(input=input_, options=options_),
2883
+ handler=_handler,
2884
+ interceptors=list(interceptors_),
2885
+ )
2886
+ response.response.close()
2887
+ return response.output
2888
+
2889
+ def tag_resource(
2890
+ self,
2891
+ resource_arn: "capo_codedeploy.types.arn.Arn",
2892
+ tags: "capo_codedeploy.types.tag_list.TagList",
2893
+ *,
2894
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2895
+ ) -> "capo_codedeploy.types.tag_resource_output.TagResourceOutput":
2896
+ """<p> Associates the list of tags in the input <code>Tags</code> parameter with the resource identified by the <code>ResourceArn</code> input parameter. </p>
2897
+
2898
+ Args:
2899
+ resource_arn: <p> The ARN of a resource, such as a CodeDeploy application or deployment group. </p>
2900
+ tags: <p> A list of tags that <code>TagResource</code> associates with a resource. The resource is identified by the <code>ResourceArn</code> input parameter. </p>
2901
+
2902
+ Raises:
2903
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
2904
+ capo_codedeploy.errors.arn_not_supported_exception.ArnNotSupportedException: <p> The specified ARN is not supported. For example, it might be an ARN for a resource that is not expected. </p>
2905
+ capo_codedeploy.errors.deployment_config_does_not_exist_exception.DeploymentConfigDoesNotExistException: <p>The deployment configuration does not exist with the user or Amazon Web Services account.</p>
2906
+ capo_codedeploy.errors.deployment_group_does_not_exist_exception.DeploymentGroupDoesNotExistException: <p>The named deployment group with the user or Amazon Web Services account does not exist.</p>
2907
+ capo_codedeploy.errors.invalid_arn_exception.InvalidArnException: <p> The specified ARN is not in a valid format. </p>
2908
+ capo_codedeploy.errors.invalid_tags_to_add_exception.InvalidTagsToAddException: <p> The specified tags are not valid. </p>
2909
+ capo_codedeploy.errors.resource_arn_required_exception.ResourceArnRequiredException: <p> The ARN of a resource is required, but was not found. </p>
2910
+ capo_codedeploy.errors.tag_required_exception.TagRequiredException: <p>A tag was not specified.</p>
2911
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2912
+ """
2913
+
2914
+ def _handler(
2915
+ req: "OperationRequest[capo_codedeploy.types.tag_resource_input.TagResourceInput]",
2916
+ ) -> OperationResponse[
2917
+ "capo_codedeploy.types.tag_resource_output.TagResourceOutput"
2918
+ ]:
2919
+ import capo_codedeploy._operations.code_deploy_20141006.tag_resource
2920
+
2921
+ output, http_response = (
2922
+ capo_codedeploy._operations.code_deploy_20141006.tag_resource.tag_resource(
2923
+ req.options, req.input
2924
+ )
2925
+ )
2926
+ return OperationResponse(output=output, response=http_response)
2927
+
2928
+ interceptors_, options_ = self.operation_options(config_overrides)
2929
+ input_: capo_codedeploy.types.tag_resource_input.TagResourceInput = {
2930
+ "resource_arn": resource_arn,
2931
+ "tags": tags,
2932
+ }
2933
+
2934
+ response = execute_pipeline(
2935
+ OperationRequest(input=input_, options=options_),
2936
+ handler=_handler,
2937
+ interceptors=list(interceptors_),
2938
+ )
2939
+ response.response.close()
2940
+ return response.output
2941
+
2942
+ def untag_resource(
2943
+ self,
2944
+ resource_arn: "capo_codedeploy.types.arn.Arn",
2945
+ tag_keys: "capo_codedeploy.types.tag_key_list.TagKeyList",
2946
+ *,
2947
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2948
+ ) -> "capo_codedeploy.types.untag_resource_output.UntagResourceOutput":
2949
+ """<p> Disassociates a resource from a list of tags. The resource is identified by the <code>ResourceArn</code> input parameter. The tags are identified by the list of keys in the <code>TagKeys</code> input parameter. </p>
2950
+
2951
+ Args:
2952
+ resource_arn: <p> The Amazon Resource Name (ARN) that specifies from which resource to disassociate the tags with the keys in the <code>TagKeys</code> input parameter. </p>
2953
+ tag_keys: <p> A list of keys of <code>Tag</code> objects. The <code>Tag</code> objects identified by the keys are disassociated from the resource specified by the <code>ResourceArn</code> input parameter. </p>
2954
+
2955
+ Raises:
2956
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
2957
+ capo_codedeploy.errors.arn_not_supported_exception.ArnNotSupportedException: <p> The specified ARN is not supported. For example, it might be an ARN for a resource that is not expected. </p>
2958
+ capo_codedeploy.errors.deployment_config_does_not_exist_exception.DeploymentConfigDoesNotExistException: <p>The deployment configuration does not exist with the user or Amazon Web Services account.</p>
2959
+ capo_codedeploy.errors.deployment_group_does_not_exist_exception.DeploymentGroupDoesNotExistException: <p>The named deployment group with the user or Amazon Web Services account does not exist.</p>
2960
+ capo_codedeploy.errors.invalid_arn_exception.InvalidArnException: <p> The specified ARN is not in a valid format. </p>
2961
+ capo_codedeploy.errors.invalid_tags_to_add_exception.InvalidTagsToAddException: <p> The specified tags are not valid. </p>
2962
+ capo_codedeploy.errors.resource_arn_required_exception.ResourceArnRequiredException: <p> The ARN of a resource is required, but was not found. </p>
2963
+ capo_codedeploy.errors.tag_required_exception.TagRequiredException: <p>A tag was not specified.</p>
2964
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
2965
+ """
2966
+
2967
+ def _handler(
2968
+ req: "OperationRequest[capo_codedeploy.types.untag_resource_input.UntagResourceInput]",
2969
+ ) -> OperationResponse[
2970
+ "capo_codedeploy.types.untag_resource_output.UntagResourceOutput"
2971
+ ]:
2972
+ import capo_codedeploy._operations.code_deploy_20141006.untag_resource
2973
+
2974
+ output, http_response = (
2975
+ capo_codedeploy._operations.code_deploy_20141006.untag_resource.untag_resource(
2976
+ req.options, req.input
2977
+ )
2978
+ )
2979
+ return OperationResponse(output=output, response=http_response)
2980
+
2981
+ interceptors_, options_ = self.operation_options(config_overrides)
2982
+ input_: capo_codedeploy.types.untag_resource_input.UntagResourceInput = {
2983
+ "resource_arn": resource_arn,
2984
+ "tag_keys": tag_keys,
2985
+ }
2986
+
2987
+ response = execute_pipeline(
2988
+ OperationRequest(input=input_, options=options_),
2989
+ handler=_handler,
2990
+ interceptors=list(interceptors_),
2991
+ )
2992
+ response.response.close()
2993
+ return response.output
2994
+
2995
+ def update_application(
2996
+ self,
2997
+ *,
2998
+ config_overrides: Optional[CodeDeployClientConfig] = None,
2999
+ application_name: Optional[
3000
+ "capo_codedeploy.types.application_name.ApplicationName"
3001
+ ] = None,
3002
+ new_application_name: Optional[
3003
+ "capo_codedeploy.types.application_name.ApplicationName"
3004
+ ] = None,
3005
+ ) -> None:
3006
+ """<p>Changes the name of an application.</p>
3007
+
3008
+ Args:
3009
+ application_name: <p>The current name of the application you want to change.</p>
3010
+ new_application_name: <p>The new name to give the application.</p>
3011
+
3012
+ Raises:
3013
+ capo_codedeploy.errors.application_already_exists_exception.ApplicationAlreadyExistsException: <p>An application with the specified name with the user or Amazon Web Services account already exists.</p>
3014
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
3015
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
3016
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
3017
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
3018
+ """
3019
+
3020
+ def _handler(
3021
+ req: "OperationRequest[capo_codedeploy.types.update_application_input.UpdateApplicationInput]",
3022
+ ) -> OperationResponse[None]:
3023
+ import capo_codedeploy._operations.code_deploy_20141006.update_application
3024
+
3025
+ output, http_response = (
3026
+ capo_codedeploy._operations.code_deploy_20141006.update_application.update_application(
3027
+ req.options, req.input
3028
+ )
3029
+ )
3030
+ return OperationResponse(output=output, response=http_response)
3031
+
3032
+ interceptors_, options_ = self.operation_options(config_overrides)
3033
+ input_: capo_codedeploy.types.update_application_input.UpdateApplicationInput = {}
3034
+ if application_name is not None:
3035
+ input_["application_name"] = application_name
3036
+ if new_application_name is not None:
3037
+ input_["new_application_name"] = new_application_name
3038
+
3039
+ response = execute_pipeline(
3040
+ OperationRequest(input=input_, options=options_),
3041
+ handler=_handler,
3042
+ interceptors=list(interceptors_),
3043
+ )
3044
+ response.response.close()
3045
+ return response.output
3046
+
3047
+ def update_deployment_group(
3048
+ self,
3049
+ application_name: "capo_codedeploy.types.application_name.ApplicationName",
3050
+ current_deployment_group_name: "capo_codedeploy.types.deployment_group_name.DeploymentGroupName",
3051
+ *,
3052
+ config_overrides: Optional[CodeDeployClientConfig] = None,
3053
+ new_deployment_group_name: Optional[
3054
+ "capo_codedeploy.types.deployment_group_name.DeploymentGroupName"
3055
+ ] = None,
3056
+ deployment_config_name: Optional[
3057
+ "capo_codedeploy.types.deployment_config_name.DeploymentConfigName"
3058
+ ] = None,
3059
+ ec2_tag_filters: Optional[
3060
+ "capo_codedeploy.types.ec2_tag_filter_list.EC2TagFilterList"
3061
+ ] = None,
3062
+ on_premises_instance_tag_filters: Optional[
3063
+ "capo_codedeploy.types.tag_filter_list.TagFilterList"
3064
+ ] = None,
3065
+ auto_scaling_groups: Optional[
3066
+ "capo_codedeploy.types.auto_scaling_group_name_list.AutoScalingGroupNameList"
3067
+ ] = None,
3068
+ service_role_arn: Optional["capo_codedeploy.types.role.Role"] = None,
3069
+ trigger_configurations: Optional[
3070
+ "capo_codedeploy.types.trigger_config_list.TriggerConfigList"
3071
+ ] = None,
3072
+ alarm_configuration: Optional[
3073
+ "capo_codedeploy.types.alarm_configuration.AlarmConfiguration"
3074
+ ] = None,
3075
+ auto_rollback_configuration: Optional[
3076
+ "capo_codedeploy.types.auto_rollback_configuration.AutoRollbackConfiguration"
3077
+ ] = None,
3078
+ outdated_instances_strategy: Optional[
3079
+ "capo_codedeploy.types.outdated_instances_strategy.OutdatedInstancesStrategy"
3080
+ ] = None,
3081
+ deployment_style: Optional[
3082
+ "capo_codedeploy.types.deployment_style.DeploymentStyle"
3083
+ ] = None,
3084
+ blue_green_deployment_configuration: Optional[
3085
+ "capo_codedeploy.types.blue_green_deployment_configuration.BlueGreenDeploymentConfiguration"
3086
+ ] = None,
3087
+ load_balancer_info: Optional[
3088
+ "capo_codedeploy.types.load_balancer_info.LoadBalancerInfo"
3089
+ ] = None,
3090
+ ec2_tag_set: Optional["capo_codedeploy.types.ec2_tag_set.EC2TagSet"] = None,
3091
+ ecs_services: Optional[
3092
+ "capo_codedeploy.types.ecs_service_list.ECSServiceList"
3093
+ ] = None,
3094
+ on_premises_tag_set: Optional[
3095
+ "capo_codedeploy.types.on_premises_tag_set.OnPremisesTagSet"
3096
+ ] = None,
3097
+ termination_hook_enabled: Optional[
3098
+ "capo_codedeploy.types.nullable_boolean.NullableBoolean"
3099
+ ] = None,
3100
+ ) -> "capo_codedeploy.types.update_deployment_group_output.UpdateDeploymentGroupOutput":
3101
+ r"""<p>Changes information about a deployment group.</p>
3102
+
3103
+ Args:
3104
+ application_name: <p>The application name that corresponds to the deployment group to update.</p>
3105
+ current_deployment_group_name: <p>The current name of the deployment group.</p>
3106
+ new_deployment_group_name: <p>The new name of the deployment group, if you want to change it.</p>
3107
+ deployment_config_name: <p>The replacement deployment configuration name to use, if you want to change it.</p>
3108
+ ec2_tag_filters: <p>The replacement set of Amazon EC2 tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
3109
+ on_premises_instance_tag_filters: <p>The replacement set of on-premises instance tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
3110
+ auto_scaling_groups: <p>The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.</p> <ul> <li> <p>To keep the Auto Scaling groups, enter their names or do not specify this parameter. </p> </li> <li> <p>To remove Auto Scaling groups, specify a non-null empty list of Auto Scaling group names to detach all CodeDeploy-managed Auto Scaling lifecycle hooks. For examples, see <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/troubleshooting-auto-scaling.html#troubleshooting-auto-scaling-heartbeat\">Amazon EC2 instances in an Amazon EC2 Auto Scaling group fail to launch and receive the error \"Heartbeat Timeout\"</a> in the <i>CodeDeploy User Guide</i>.</p> </li> </ul>
3111
+ service_role_arn: <p>A replacement ARN for the service role, if you want to change it.</p>
3112
+ trigger_configurations: <p>Information about triggers to change when the deployment group is updated. For examples, see <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-edit.html\">Edit a Trigger in a CodeDeploy Deployment Group</a> in the <i>CodeDeploy User Guide</i>.</p>
3113
+ alarm_configuration: <p>Information to add or change about Amazon CloudWatch alarms when the deployment group is updated.</p>
3114
+ auto_rollback_configuration: <p>Information for an automatic rollback configuration that is added or changed when a deployment group is updated.</p>
3115
+ outdated_instances_strategy: <p>Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.</p> <p>If this option is set to <code>UPDATE</code> or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.</p> <p>If this option is set to <code>IGNORE</code>, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.</p>
3116
+ deployment_style: <p>Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.</p>
3117
+ blue_green_deployment_configuration: <p>Information about blue/green deployment options for a deployment group.</p>
3118
+ load_balancer_info: <p>Information about the load balancer used in a deployment.</p>
3119
+ ec2_tag_set: <p>Information about groups of tags applied to on-premises instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups.</p>
3120
+ ecs_services: <p> The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <code><clustername>:<servicename></code>. </p>
3121
+ on_premises_tag_set: <p>Information about an on-premises instance tag set. The deployment group includes only on-premises instances identified by all the tag groups.</p>
3122
+ termination_hook_enabled: <p>This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html\">Integrating CodeDeploy with Amazon EC2 Auto Scaling</a> in the <i>CodeDeploy User Guide</i>.</p> <p>Set <code>terminationHookEnabled</code> to <code>true</code> to have CodeDeploy install a termination hook into your Auto Scaling group when you update a deployment group. When this hook is installed, CodeDeploy will perform termination deployments.</p> <p>For information about termination deployments, see <a href=\"https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors-hook-enable\">Enabling termination deployments during Auto Scaling scale-in events</a> in the <i>CodeDeploy User Guide</i>.</p> <p>For more information about Auto Scaling scale-in events, see the <a href=\"https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html#as-lifecycle-scale-in\">Scale in</a> topic in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
3123
+
3124
+ Raises:
3125
+ capo_codedeploy.errors.alarms_limit_exceeded_exception.AlarmsLimitExceededException: <p>The maximum number of alarms for a deployment group (10) was exceeded.</p>
3126
+ capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
3127
+ capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
3128
+ capo_codedeploy.errors.deployment_config_does_not_exist_exception.DeploymentConfigDoesNotExistException: <p>The deployment configuration does not exist with the user or Amazon Web Services account.</p>
3129
+ capo_codedeploy.errors.deployment_group_already_exists_exception.DeploymentGroupAlreadyExistsException: <p>A deployment group with the specified name with the user or Amazon Web Services account already exists.</p>
3130
+ capo_codedeploy.errors.deployment_group_does_not_exist_exception.DeploymentGroupDoesNotExistException: <p>The named deployment group with the user or Amazon Web Services account does not exist.</p>
3131
+ capo_codedeploy.errors.deployment_group_name_required_exception.DeploymentGroupNameRequiredException: <p>The deployment group name was not specified.</p>
3132
+ capo_codedeploy.errors.ecs_service_mapping_limit_exceeded_exception.ECSServiceMappingLimitExceededException: <p> The Amazon ECS service is associated with more than one deployment groups. An Amazon ECS service can be associated with only one deployment group. </p>
3133
+ capo_codedeploy.errors.invalid_alarm_config_exception.InvalidAlarmConfigException: <p>The format of the alarm configuration is invalid. Possible causes include:</p> <ul> <li> <p>The alarm list is null.</p> </li> <li> <p>The alarm object is null.</p> </li> <li> <p>The alarm name is empty or null or exceeds the limit of 255 characters.</p> </li> <li> <p>Two alarms with the same name have been specified.</p> </li> <li> <p>The alarm configuration is enabled, but the alarm list is empty.</p> </li> </ul>
3134
+ capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
3135
+ capo_codedeploy.errors.invalid_auto_rollback_config_exception.InvalidAutoRollbackConfigException: <p>The automatic rollback configuration was specified in an invalid format. For example, automatic rollback is enabled, but an invalid triggering event type or no event types were listed.</p>
3136
+ capo_codedeploy.errors.invalid_auto_scaling_group_exception.InvalidAutoScalingGroupException: <p>The Auto Scaling group was specified in an invalid format or does not exist.</p>
3137
+ capo_codedeploy.errors.invalid_blue_green_deployment_configuration_exception.InvalidBlueGreenDeploymentConfigurationException: <p>The configuration for the blue/green deployment group was provided in an invalid format. For information about deployment configuration format, see <a>CreateDeploymentConfig</a>.</p>
3138
+ capo_codedeploy.errors.invalid_deployment_config_name_exception.InvalidDeploymentConfigNameException: <p>The deployment configuration name was specified in an invalid format.</p>
3139
+ capo_codedeploy.errors.invalid_deployment_group_name_exception.InvalidDeploymentGroupNameException: <p>The deployment group name was specified in an invalid format.</p>
3140
+ capo_codedeploy.errors.invalid_deployment_style_exception.InvalidDeploymentStyleException: <p>An invalid deployment style was specified. Valid deployment types include \"IN_PLACE\" and \"BLUE_GREEN.\" Valid deployment options include \"WITH_TRAFFIC_CONTROL\" and \"WITHOUT_TRAFFIC_CONTROL.\"</p>
3141
+ capo_codedeploy.errors.invalid_ec2_tag_combination_exception.InvalidEC2TagCombinationException: <p>A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but only one of these data types can be used in a single call.</p>
3142
+ capo_codedeploy.errors.invalid_ec2_tag_exception.InvalidEC2TagException: <p>The tag was specified in an invalid format.</p>
3143
+ capo_codedeploy.errors.invalid_ecs_service_exception.InvalidECSServiceException: <p> The Amazon ECS service identifier is not valid. </p>
3144
+ capo_codedeploy.errors.invalid_input_exception.InvalidInputException: <p>The input was specified in an invalid format.</p>
3145
+ capo_codedeploy.errors.invalid_load_balancer_info_exception.InvalidLoadBalancerInfoException: <p>An invalid load balancer name, or no load balancer name, was specified.</p>
3146
+ capo_codedeploy.errors.invalid_on_premises_tag_combination_exception.InvalidOnPremisesTagCombinationException: <p>A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, but only one of these data types can be used in a single call.</p>
3147
+ capo_codedeploy.errors.invalid_role_exception.InvalidRoleException: <p>The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.</p>
3148
+ capo_codedeploy.errors.invalid_tag_exception.InvalidTagException: <p>The tag was specified in an invalid format.</p>
3149
+ capo_codedeploy.errors.invalid_target_group_pair_exception.InvalidTargetGroupPairException: <p> A target group pair associated with this deployment is not valid. </p>
3150
+ capo_codedeploy.errors.invalid_traffic_routing_configuration_exception.InvalidTrafficRoutingConfigurationException: <p> The configuration that specifies how traffic is routed during a deployment is invalid.</p>
3151
+ capo_codedeploy.errors.invalid_trigger_config_exception.InvalidTriggerConfigException: <p>The trigger was specified in an invalid format.</p>
3152
+ capo_codedeploy.errors.lifecycle_hook_limit_exceeded_exception.LifecycleHookLimitExceededException: <p>The limit for lifecycle hooks was exceeded.</p>
3153
+ capo_codedeploy.errors.tag_set_list_limit_exceeded_exception.TagSetListLimitExceededException: <p>The number of tag groups included in the tag set list exceeded the maximum allowed limit of 3.</p>
3154
+ capo_codedeploy.errors.throttling_exception.ThrottlingException: <p>An API function was called too frequently.</p>
3155
+ capo_codedeploy.errors.trigger_targets_limit_exceeded_exception.TriggerTargetsLimitExceededException: <p>The maximum allowed number of triggers was exceeded.</p>
3156
+ capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
3157
+ """
3158
+
3159
+ def _handler(
3160
+ req: "OperationRequest[capo_codedeploy.types.update_deployment_group_input.UpdateDeploymentGroupInput]",
3161
+ ) -> OperationResponse[
3162
+ "capo_codedeploy.types.update_deployment_group_output.UpdateDeploymentGroupOutput"
3163
+ ]:
3164
+ import capo_codedeploy._operations.code_deploy_20141006.update_deployment_group
3165
+
3166
+ output, http_response = (
3167
+ capo_codedeploy._operations.code_deploy_20141006.update_deployment_group.update_deployment_group(
3168
+ req.options, req.input
3169
+ )
3170
+ )
3171
+ return OperationResponse(output=output, response=http_response)
3172
+
3173
+ interceptors_, options_ = self.operation_options(config_overrides)
3174
+ input_: capo_codedeploy.types.update_deployment_group_input.UpdateDeploymentGroupInput = {
3175
+ "application_name": application_name,
3176
+ "current_deployment_group_name": current_deployment_group_name,
3177
+ }
3178
+ if new_deployment_group_name is not None:
3179
+ input_["new_deployment_group_name"] = new_deployment_group_name
3180
+ if deployment_config_name is not None:
3181
+ input_["deployment_config_name"] = deployment_config_name
3182
+ if ec2_tag_filters is not None:
3183
+ input_["ec2_tag_filters"] = ec2_tag_filters
3184
+ if on_premises_instance_tag_filters is not None:
3185
+ input_["on_premises_instance_tag_filters"] = (
3186
+ on_premises_instance_tag_filters
3187
+ )
3188
+ if auto_scaling_groups is not None:
3189
+ input_["auto_scaling_groups"] = auto_scaling_groups
3190
+ if service_role_arn is not None:
3191
+ input_["service_role_arn"] = service_role_arn
3192
+ if trigger_configurations is not None:
3193
+ input_["trigger_configurations"] = trigger_configurations
3194
+ if alarm_configuration is not None:
3195
+ input_["alarm_configuration"] = alarm_configuration
3196
+ if auto_rollback_configuration is not None:
3197
+ input_["auto_rollback_configuration"] = auto_rollback_configuration
3198
+ if outdated_instances_strategy is not None:
3199
+ input_["outdated_instances_strategy"] = outdated_instances_strategy
3200
+ if deployment_style is not None:
3201
+ input_["deployment_style"] = deployment_style
3202
+ if blue_green_deployment_configuration is not None:
3203
+ input_["blue_green_deployment_configuration"] = (
3204
+ blue_green_deployment_configuration
3205
+ )
3206
+ if load_balancer_info is not None:
3207
+ input_["load_balancer_info"] = load_balancer_info
3208
+ if ec2_tag_set is not None:
3209
+ input_["ec2_tag_set"] = ec2_tag_set
3210
+ if ecs_services is not None:
3211
+ input_["ecs_services"] = ecs_services
3212
+ if on_premises_tag_set is not None:
3213
+ input_["on_premises_tag_set"] = on_premises_tag_set
3214
+ if termination_hook_enabled is not None:
3215
+ input_["termination_hook_enabled"] = termination_hook_enabled
3216
+
3217
+ response = execute_pipeline(
3218
+ OperationRequest(input=input_, options=options_),
3219
+ handler=_handler,
3220
+ interceptors=list(interceptors_),
3221
+ )
3222
+ response.response.close()
3223
+ return response.output
3224
+
3225
+ def __enter__(self) -> Self:
3226
+ return self
3227
+
3228
+ def __exit__(self, exc_type: Any, exc: Any, tb: Any):
3229
+ self._client.close()