awscli 1.40.17__py3-none-any.whl → 1.44.26__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 (401) hide show
  1. awscli/__init__.py +1 -1
  2. awscli/alias.py +3 -3
  3. awscli/argprocess.py +7 -2
  4. awscli/arguments.py +1 -1
  5. awscli/bcdoc/docevents.py +3 -0
  6. awscli/clidocs.py +19 -2
  7. awscli/clidriver.py +57 -10
  8. awscli/compat.py +11 -0
  9. awscli/customizations/argrename.py +1 -3
  10. awscli/customizations/cliinputjson.py +4 -0
  11. awscli/customizations/cloudformation/deploy.py +23 -6
  12. awscli/customizations/cloudformation/deployer.py +2 -2
  13. awscli/customizations/cloudformation/package.py +3 -2
  14. awscli/customizations/cloudfront.py +3 -1
  15. awscli/customizations/cloudtrail/subscribe.py +5 -5
  16. awscli/customizations/cloudtrail/validation.py +32 -11
  17. awscli/customizations/codecommit.py +2 -3
  18. awscli/customizations/codedeploy/deregister.py +5 -2
  19. awscli/customizations/codedeploy/push.py +7 -6
  20. awscli/customizations/codedeploy/register.py +5 -2
  21. awscli/customizations/codedeploy/systems.py +3 -1
  22. awscli/customizations/commands.py +2 -1
  23. awscli/customizations/configservice/getstatus.py +3 -3
  24. awscli/customizations/datapipeline/__init__.py +7 -4
  25. awscli/customizations/datapipeline/createdefaultroles.py +4 -2
  26. awscli/customizations/dlm/createdefaultrole.py +4 -2
  27. awscli/customizations/ec2/bundleinstance.py +2 -1
  28. awscli/customizations/eks/get_token.py +6 -4
  29. awscli/customizations/eks/update_kubeconfig.py +15 -3
  30. awscli/customizations/emr/argumentschema.py +355 -344
  31. awscli/customizations/emr/createcluster.py +520 -282
  32. awscli/customizations/emr/emrutils.py +83 -50
  33. awscli/customizations/emr/helptext.py +132 -74
  34. awscli/customizations/emr/steputils.py +92 -52
  35. awscli/customizations/gamelift/getlog.py +3 -2
  36. awscli/customizations/gamelift/uploadbuild.py +30 -15
  37. awscli/customizations/globalargs.py +169 -0
  38. awscli/customizations/logs/startlivetail.py +3 -3
  39. awscli/customizations/paginate.py +66 -1
  40. awscli/customizations/rds.py +3 -1
  41. awscli/customizations/removals.py +4 -0
  42. awscli/customizations/s3/filegenerator.py +7 -1
  43. awscli/customizations/s3/fileinfo.py +5 -1
  44. awscli/customizations/s3/fileinfobuilder.py +7 -0
  45. awscli/customizations/s3/s3handler.py +11 -0
  46. awscli/customizations/s3/subcommands.py +147 -6
  47. awscli/customizations/s3/syncstrategy/base.py +9 -0
  48. awscli/customizations/s3/syncstrategy/caseconflict.py +96 -0
  49. awscli/customizations/s3/utils.py +25 -0
  50. awscli/customizations/s3uploader.py +18 -8
  51. awscli/customizations/scalarparse.py +48 -9
  52. awscli/customizations/utils.py +2 -1
  53. awscli/customizations/waiters.py +3 -2
  54. awscli/data/cli.json +5 -0
  55. awscli/examples/apigateway/update-vpc-link.rst +47 -0
  56. awscli/examples/apigatewayv2/create-routing-rule.rst +52 -0
  57. awscli/examples/apigatewayv2/delete-routing-rule.rst +11 -0
  58. awscli/examples/apigatewayv2/get-routing-rule.rst +35 -0
  59. awscli/examples/apigatewayv2/list-routing-rules.rst +38 -0
  60. awscli/examples/apigatewayv2/put-routing-rule.rst +52 -0
  61. awscli/examples/application-signals/batch-get-service-level-objective-budget-report.rst +99 -0
  62. awscli/examples/application-signals/create-service-level-objective.rst +88 -0
  63. awscli/examples/application-signals/delete-service-level-objective.rst +10 -0
  64. awscli/examples/application-signals/get-service-level-objective.rst +53 -0
  65. awscli/examples/application-signals/get-service.rst +72 -0
  66. awscli/examples/application-signals/list-service-dependencies.rst +96 -0
  67. awscli/examples/application-signals/list-service-dependents.rst +36 -0
  68. awscli/examples/application-signals/list-service-level-objectives.rst +17 -0
  69. awscli/examples/application-signals/list-service-operations.rst +63 -0
  70. awscli/examples/application-signals/list-services.rst +61 -0
  71. awscli/examples/application-signals/list-tags-for-resource.rst +17 -0
  72. awscli/examples/application-signals/start-discovery.rst +9 -0
  73. awscli/examples/application-signals/tag-resource.rst +11 -0
  74. awscli/examples/application-signals/untag-resource.rst +11 -0
  75. awscli/examples/application-signals/update-service-level-objective.rst +69 -0
  76. awscli/examples/cloudformation/_package_description.rst +4 -4
  77. awscli/examples/cloudformation/create-generated-template.rst +50 -0
  78. awscli/examples/cloudformation/create-stack-refactor.rst +16 -0
  79. awscli/examples/cloudformation/delete-generated-template.rst +10 -0
  80. awscli/examples/cloudformation/describe-generated-template.rst +62 -0
  81. awscli/examples/cloudformation/describe-resource-scan.rst +38 -0
  82. awscli/examples/cloudformation/describe-stack-refactor.rst +20 -0
  83. awscli/examples/cloudformation/execute-stack-refactor.rst +10 -0
  84. awscli/examples/cloudformation/list-generated-templates.rst +41 -0
  85. awscli/examples/cloudformation/list-resource-scan-related-resources.rst +47 -0
  86. awscli/examples/cloudformation/list-resource-scan-resources.rst +30 -0
  87. awscli/examples/cloudformation/list-stack-refactor-actions.rst +71 -0
  88. awscli/examples/cloudformation/start-resource-scan.rst +14 -0
  89. awscli/examples/cloudfront/associate-distribution-tenant-web-acl.rst +18 -0
  90. awscli/examples/cloudfront/associate-distribution-web-acl.rst +18 -0
  91. awscli/examples/cloudfront/create-connection-group.rst +39 -0
  92. awscli/examples/cloudfront/create-distribution-tenant.rst +275 -0
  93. awscli/examples/cloudfront/create-distribution.rst +625 -235
  94. awscli/examples/cloudfront/create-invalidation-for-distribution-tenant.rst +29 -0
  95. awscli/examples/cloudfront/delete-connection-group.rst +11 -0
  96. awscli/examples/cloudfront/delete-distribution-tenant.rst +11 -0
  97. awscli/examples/cloudfront/disassociate-distribution-tenant-web-acl.rst +16 -0
  98. awscli/examples/cloudfront/disassociate-distribution-web-acl.rst +16 -0
  99. awscli/examples/cloudfront/get-connection-group-by-routing-endpoint.rst +26 -0
  100. awscli/examples/cloudfront/get-connection-group.rst +26 -0
  101. awscli/examples/cloudfront/get-distribution-tenant-by-domain.rst +37 -0
  102. awscli/examples/cloudfront/get-distribution-tenant.rst +31 -0
  103. awscli/examples/cloudfront/get-invalidation-for-distribution-tenant.rst +29 -0
  104. awscli/examples/cloudfront/get-managed-certificate-details.rst +25 -0
  105. awscli/examples/cloudfront/list-connection-groups.rst +38 -0
  106. awscli/examples/cloudfront/list-distribution-tenants-by-customization.rst +45 -0
  107. awscli/examples/cloudfront/list-distribution-tenants.rst +90 -0
  108. awscli/examples/cloudfront/list-distributions-by-connection-mode.rst +115 -0
  109. awscli/examples/cloudfront/list-domain-conflicts.rst +22 -0
  110. awscli/examples/cloudfront/list-invalidations-for-distribution-tenant.rst +22 -0
  111. awscli/examples/cloudfront/update-connection-group.rst +29 -0
  112. awscli/examples/cloudfront/update-distribution-tenant.rst +76 -0
  113. awscli/examples/cloudfront/update-domain-association.rst +18 -0
  114. awscli/examples/cloudfront/verify-dns-configuration.rst +20 -0
  115. awscli/examples/ec2/associate-ipam-resource-discovery.rst +1 -1
  116. awscli/examples/ec2/authorize-security-group-ingress.rst +1 -1
  117. awscli/examples/ec2/create-ipam-resource-discovery.rst +1 -1
  118. awscli/examples/ec2/delete-ipam-pool.rst +1 -1
  119. awscli/examples/ec2/describe-addresses-attribute.rst +1 -1
  120. awscli/examples/ec2/get-ipam-discovered-public-addresses.rst +1 -1
  121. awscli/examples/ec2/modify-ipam-resource-discovery.rst +1 -1
  122. awscli/examples/ec2/modify-ipam-scope.rst +1 -1
  123. awscli/examples/ec2/release-ipam-pool-allocation.rst +3 -3
  124. awscli/examples/eks/associate-access-policy.rst +29 -0
  125. awscli/examples/eks/create-access-entry.rst +54 -0
  126. awscli/examples/eks/create-pod-identity-association.rst +59 -0
  127. awscli/examples/eks/delete-access-entry.rst +11 -0
  128. awscli/examples/eks/delete-pod-identity-association.rst +28 -0
  129. awscli/examples/eks/describe-access-entry.rst +25 -0
  130. awscli/examples/eks/describe-insight.rst +36 -0
  131. awscli/examples/eks/describe-pod-identity-association.rst +28 -0
  132. awscli/examples/eks/disassociate-access-policy.rst +12 -0
  133. awscli/examples/eks/list-access-entries.rst +19 -0
  134. awscli/examples/eks/list-access-policies.rst +90 -0
  135. awscli/examples/eks/list-associated-access-policies.rst +27 -0
  136. awscli/examples/eks/list-insights.rst +67 -0
  137. awscli/examples/eks/list-pod-identity-associations.rst +61 -0
  138. awscli/examples/eks/update-access-entry.rst +28 -0
  139. awscli/examples/eks/update-pod-identity-association.rst +29 -0
  140. awscli/examples/elbv2/modify-listener.rst +95 -86
  141. awscli/examples/emr/create-cluster-synopsis.txt +1 -0
  142. awscli/examples/global_options.rst +4 -0
  143. awscli/examples/global_synopsis.rst +1 -0
  144. awscli/examples/guardduty/update-detector.rst +23 -0
  145. awscli/examples/ivs-realtime/create-stage.rst +6 -3
  146. awscli/examples/ivs-realtime/get-composition.rst +7 -4
  147. awscli/examples/ivs-realtime/get-participant.rst +99 -31
  148. awscli/examples/ivs-realtime/get-stage.rst +3 -2
  149. awscli/examples/ivs-realtime/list-participant-events.rst +54 -2
  150. awscli/examples/ivs-realtime/list-participant-replicas.rst +24 -0
  151. awscli/examples/ivs-realtime/list-participants.rst +61 -3
  152. awscli/examples/ivs-realtime/start-composition.rst +88 -3
  153. awscli/examples/ivs-realtime/start-participant-replication.rst +24 -0
  154. awscli/examples/ivs-realtime/stop-participant-replication.rst +24 -0
  155. awscli/examples/ivs-realtime/update-stage.rst +51 -3
  156. awscli/examples/kms/create-key.rst +42 -7
  157. awscli/examples/kms/delete-imported-key-material.rst +8 -2
  158. awscli/examples/kms/describe-key.rst +2 -0
  159. awscli/examples/kms/disable-key.rst +1 -1
  160. awscli/examples/kms/generate-data-key-pair-without-plaintext.rst +1 -0
  161. awscli/examples/kms/generate-data-key-pair.rst +1 -0
  162. awscli/examples/kms/generate-data-key-without-plaintext.rst +2 -1
  163. awscli/examples/kms/generate-data-key.rst +5 -4
  164. awscli/examples/kms/generate-mac.rst +45 -0
  165. awscli/examples/kms/generate-random.rst +1 -1
  166. awscli/examples/kms/get-public-key.rst +2 -3
  167. awscli/examples/kms/import-key-material.rst +6 -1
  168. awscli/examples/kms/re-encrypt.rst +3 -3
  169. awscli/examples/kms/sign.rst +1 -1
  170. awscli/examples/kms/verify-mac.rst +27 -0
  171. awscli/examples/kms/verify.rst +5 -1
  172. awscli/examples/lambda/create-function.rst +4 -4
  173. awscli/examples/lambda/get-function.rst +3 -3
  174. awscli/examples/lambda/list-functions.rst +6 -6
  175. awscli/examples/medical-imaging/create-datastore.rst +19 -2
  176. awscli/examples/medical-imaging/get-datastore.rst +24 -1
  177. awscli/examples/networkmanager/get-vpc-attachment.rst +1 -1
  178. awscli/examples/omics/cancel-run.rst +1 -1
  179. awscli/examples/omics/create-run-group.rst +4 -2
  180. awscli/examples/omics/create-workflow.rst +1 -1
  181. awscli/examples/omics/delete-run-group.rst +1 -1
  182. awscli/examples/omics/delete-run.rst +1 -1
  183. awscli/examples/omics/delete-workflow.rst +1 -1
  184. awscli/examples/omics/get-run-group.rst +1 -1
  185. awscli/examples/omics/get-run-task.rst +1 -1
  186. awscli/examples/omics/get-run.rst +1 -1
  187. awscli/examples/omics/get-workflow.rst +1 -1
  188. awscli/examples/omics/list-run-groups.rst +1 -1
  189. awscli/examples/omics/list-run-tasks.rst +1 -1
  190. awscli/examples/omics/list-runs.rst +1 -1
  191. awscli/examples/omics/list-workflows.rst +1 -1
  192. awscli/examples/omics/start-run.rst +1 -2
  193. awscli/examples/omics/update-workflow.rst +1 -1
  194. awscli/examples/pi/create-performance-analysis-report.rst +17 -0
  195. awscli/examples/pi/delete-performance-analysis-report.rst +12 -0
  196. awscli/examples/pi/describe-dimension-keys.rst +33 -1
  197. awscli/examples/pi/get-dimension-key-details.rst +25 -0
  198. awscli/examples/pi/get-performance-analysis-report.rst +27 -0
  199. awscli/examples/pi/get-resource-metadata.rst +20 -0
  200. awscli/examples/pi/list-available-resource-dimensions.rst +48 -0
  201. awscli/examples/pi/list-available-resource-metrics.rst +29 -0
  202. awscli/examples/pi/list-performance-analysis-reports.rst +44 -0
  203. awscli/examples/pi/list-tags-for-resource.rst +20 -0
  204. awscli/examples/pi/tag-resource.rst +12 -0
  205. awscli/examples/pi/untag-resource.rst +12 -0
  206. awscli/examples/route53domains/get-domain-detail.rst +3 -3
  207. awscli/examples/securityhub/describe-hub.rst +6 -4
  208. awscli/examples/servicediscovery/create-service.rst +50 -10
  209. awscli/examples/servicediscovery/delete-namespace.rst +18 -4
  210. awscli/examples/servicediscovery/delete-service-attributes.rst +15 -3
  211. awscli/examples/servicediscovery/delete-service.rst +13 -3
  212. awscli/examples/servicediscovery/deregister-instance.rst +18 -2
  213. awscli/examples/servicediscovery/discover-instances-revision.rst +18 -1
  214. awscli/examples/servicediscovery/discover-instances.rst +32 -2
  215. awscli/examples/servicediscovery/get-instance.rst +30 -4
  216. awscli/examples/servicediscovery/get-instances-health-status.rst +19 -1
  217. awscli/examples/servicediscovery/get-namespace.rst +40 -9
  218. awscli/examples/servicediscovery/get-operation.rst +32 -6
  219. awscli/examples/servicediscovery/get-service-attributes.rst +25 -3
  220. awscli/examples/servicediscovery/get-service.rst +35 -7
  221. awscli/examples/servicediscovery/list-instances.rst +38 -3
  222. awscli/examples/servicediscovery/list-namespaces.rst +45 -22
  223. awscli/examples/servicediscovery/list-services.rst +30 -2
  224. awscli/examples/servicediscovery/register-instance.rst +18 -2
  225. awscli/examples/servicediscovery/update-http-namespace.rst +22 -5
  226. awscli/examples/servicediscovery/update-instance-custom-health-status.rst +14 -1
  227. awscli/examples/servicediscovery/update-private-dns-namespace.rst +22 -5
  228. awscli/examples/servicediscovery/update-public-dns-namespace.rst +22 -5
  229. awscli/examples/servicediscovery/update-service-attributes.rst +14 -2
  230. awscli/examples/servicediscovery/update-service.rst +20 -4
  231. awscli/examples/ssm/put-parameter.rst +6 -6
  232. awscli/examples/verifiedpermissions/update-policy.rst +10 -78
  233. awscli/examples/workspaces/describe-workspace-directories.rst +1 -2
  234. awscli/examples/workspaces/register-workspace-directory.rst +2 -3
  235. awscli/handlers.py +0 -4
  236. awscli/paramfile.py +21 -4
  237. awscli/testutils.py +22 -4
  238. awscli/topics/config-vars.rst +1 -1
  239. awscli/topics/s3-case-insensitivity.rst +105 -0
  240. awscli/topics/topic-tags.json +16 -0
  241. awscli/utils.py +33 -2
  242. {awscli-1.40.17.dist-info → awscli-1.44.26.dist-info}/METADATA +18 -3
  243. {awscli-1.40.17.dist-info → awscli-1.44.26.dist-info}/RECORD +251 -308
  244. awscli/customizations/opsworks.py +0 -543
  245. awscli/customizations/opsworkscm.py +0 -21
  246. awscli/examples/elastictranscoder/cancel-job.rst +0 -8
  247. awscli/examples/elastictranscoder/create-job.rst +0 -94
  248. awscli/examples/elastictranscoder/create-pipeline.rst +0 -94
  249. awscli/examples/elastictranscoder/create-preset.rst +0 -141
  250. awscli/examples/elastictranscoder/delete-pipeline.rst +0 -13
  251. awscli/examples/elastictranscoder/delete-preset.rst +0 -8
  252. awscli/examples/elastictranscoder/list-jobs-by-pipeline.rst +0 -13
  253. awscli/examples/elastictranscoder/list-jobs-by-status.rst +0 -14
  254. awscli/examples/elastictranscoder/list-pipelines.rst +0 -84
  255. awscli/examples/elastictranscoder/list-presets.rst +0 -95
  256. awscli/examples/elastictranscoder/read-job.rst +0 -65
  257. awscli/examples/elastictranscoder/read-pipeline.rst +0 -59
  258. awscli/examples/elastictranscoder/read-preset.rst +0 -100
  259. awscli/examples/elastictranscoder/update-pipeline-notifications.rst +0 -52
  260. awscli/examples/elastictranscoder/update-pipeline-status.rst +0 -53
  261. awscli/examples/elastictranscoder/update-pipeline.rst +0 -95
  262. awscli/examples/opsworks/assign-instance.rst +0 -14
  263. awscli/examples/opsworks/assign-volume.rst +0 -17
  264. awscli/examples/opsworks/associate-elastic-ip.rst +0 -14
  265. awscli/examples/opsworks/attach-elastic-load-balancer.rst +0 -14
  266. awscli/examples/opsworks/create-app.rst +0 -64
  267. awscli/examples/opsworks/create-deployment.rst +0 -66
  268. awscli/examples/opsworks/create-instance.rst +0 -25
  269. awscli/examples/opsworks/create-layer.rst +0 -17
  270. awscli/examples/opsworks/create-server.rst +0 -43
  271. awscli/examples/opsworks/create-stack.rst +0 -25
  272. awscli/examples/opsworks/create-user-profile.rst +0 -24
  273. awscli/examples/opsworks/delete-app.rst +0 -17
  274. awscli/examples/opsworks/delete-instance.rst +0 -15
  275. awscli/examples/opsworks/delete-layer.rst +0 -17
  276. awscli/examples/opsworks/delete-stack.rst +0 -18
  277. awscli/examples/opsworks/delete-user-profile.rst +0 -17
  278. awscli/examples/opsworks/deregister-elastic-ip.rst +0 -13
  279. awscli/examples/opsworks/deregister-instance.rst +0 -14
  280. awscli/examples/opsworks/deregister-rds-db-instance.rst +0 -20
  281. awscli/examples/opsworks/deregister-volume.rst +0 -15
  282. awscli/examples/opsworks/describe-apps.rst +0 -38
  283. awscli/examples/opsworks/describe-commands.rst +0 -43
  284. awscli/examples/opsworks/describe-deployments.rst +0 -52
  285. awscli/examples/opsworks/describe-elastic-ips.rst +0 -24
  286. awscli/examples/opsworks/describe-elastic-load-balancers.rst +0 -37
  287. awscli/examples/opsworks/describe-instances.rst +0 -95
  288. awscli/examples/opsworks/describe-layers.rst +0 -171
  289. awscli/examples/opsworks/describe-load-based-auto-scaling.rst +0 -37
  290. awscli/examples/opsworks/describe-my-user-profile.rst +0 -24
  291. awscli/examples/opsworks/describe-permissions.rst +0 -26
  292. awscli/examples/opsworks/describe-raid-arrays.rst +0 -31
  293. awscli/examples/opsworks/describe-rds-db-instances.rst +0 -29
  294. awscli/examples/opsworks/describe-stack-provisioning-parameters.rst +0 -32
  295. awscli/examples/opsworks/describe-stack-summary.rst +0 -27
  296. awscli/examples/opsworks/describe-stacks.rst +0 -65
  297. awscli/examples/opsworks/describe-timebased-auto-scaling.rst +0 -39
  298. awscli/examples/opsworks/describe-user-profiles.rst +0 -32
  299. awscli/examples/opsworks/describe-volumes.rst +0 -31
  300. awscli/examples/opsworks/detach-elastic-load-balancer.rst +0 -14
  301. awscli/examples/opsworks/disassociate-elastic-ip.rst +0 -14
  302. awscli/examples/opsworks/get-hostname-suggestion.rst +0 -21
  303. awscli/examples/opsworks/reboot-instance.rst +0 -14
  304. awscli/examples/opsworks/register-elastic-ip.rst +0 -19
  305. awscli/examples/opsworks/register-rds-db-instance.rst +0 -15
  306. awscli/examples/opsworks/register-volume.rst +0 -18
  307. awscli/examples/opsworks/register.rst +0 -105
  308. awscli/examples/opsworks/set-load-based-auto-scaling.rst +0 -38
  309. awscli/examples/opsworks/set-permission.rst +0 -23
  310. awscli/examples/opsworks/set-time-based-auto-scaling.rst +0 -33
  311. awscli/examples/opsworks/start-instance.rst +0 -20
  312. awscli/examples/opsworks/start-stack.rst +0 -15
  313. awscli/examples/opsworks/stop-instance.rst +0 -20
  314. awscli/examples/opsworks/stop-stack.rst +0 -15
  315. awscli/examples/opsworks/unassign-instance.rst +0 -14
  316. awscli/examples/opsworks/unassign-volume.rst +0 -16
  317. awscli/examples/opsworks/update-app.rst +0 -14
  318. awscli/examples/opsworks/update-elastic-ip.rst +0 -14
  319. awscli/examples/opsworks/update-instance.rst +0 -14
  320. awscli/examples/opsworks/update-layer.rst +0 -14
  321. awscli/examples/opsworks/update-my-user-profile.rst +0 -16
  322. awscli/examples/opsworks/update-rds-db-instance.rst +0 -18
  323. awscli/examples/opsworks/update-volume.rst +0 -16
  324. awscli/examples/opsworkscm/associate-node.rst +0 -22
  325. awscli/examples/opsworkscm/create-backup.rst +0 -46
  326. awscli/examples/opsworkscm/create-server.rst +0 -48
  327. awscli/examples/opsworkscm/delete-backup.rst +0 -17
  328. awscli/examples/opsworkscm/delete-server.rst +0 -16
  329. awscli/examples/opsworkscm/describe-account-attributes.rst +0 -26
  330. awscli/examples/opsworkscm/describe-backups.rst +0 -44
  331. awscli/examples/opsworkscm/describe-events.rst +0 -21
  332. awscli/examples/opsworkscm/describe-node-association-status.rst +0 -20
  333. awscli/examples/opsworkscm/describe-servers.rst +0 -48
  334. awscli/examples/opsworkscm/disassociate-node.rst +0 -19
  335. awscli/examples/opsworkscm/restore-server.rst +0 -20
  336. awscli/examples/opsworkscm/start-maintenance.rst +0 -39
  337. awscli/examples/opsworkscm/update-server-engine-attributes.rst +0 -43
  338. awscli/examples/opsworkscm/update-server.rst +0 -42
  339. awscli/examples/qldb/cancel-journal-kinesis-stream.rst +0 -15
  340. awscli/examples/qldb/create-ledger.rst +0 -43
  341. awscli/examples/qldb/delete-ledger.rst +0 -10
  342. awscli/examples/qldb/describe-journal-kinesis-stream.rst +0 -29
  343. awscli/examples/qldb/describe-journal-s3-export.rst +0 -30
  344. awscli/examples/qldb/describe-ledger.rst +0 -23
  345. awscli/examples/qldb/export-journal-to-s3.rst +0 -28
  346. awscli/examples/qldb/get-block.rst +0 -55
  347. awscli/examples/qldb/get-digest.rst +0 -17
  348. awscli/examples/qldb/get-revision.rst +0 -57
  349. awscli/examples/qldb/list-journal-kinesis-streams-for-ledger.rst +0 -30
  350. awscli/examples/qldb/list-journal-s3-exports-for-ledger.rst +0 -31
  351. awscli/examples/qldb/list-journal-s3-exports.rst +0 -46
  352. awscli/examples/qldb/list-ledgers.rst +0 -24
  353. awscli/examples/qldb/list-tags-for-resource.rst +0 -17
  354. awscli/examples/qldb/stream-journal-to-kinesis.rst +0 -46
  355. awscli/examples/qldb/tag-resource.rst +0 -11
  356. awscli/examples/qldb/untag-resource.rst +0 -11
  357. awscli/examples/qldb/update-ledger-permissions-mode.rst +0 -34
  358. awscli/examples/qldb/update-ledger.rst +0 -63
  359. awscli/examples/robomaker/batch-describe-simulation-job.rst +0 -150
  360. awscli/examples/robomaker/cancel-simulation-job.rst +0 -6
  361. awscli/examples/robomaker/create-deployment-job.rst +0 -37
  362. awscli/examples/robomaker/create-fleet.rst +0 -18
  363. awscli/examples/robomaker/create-robot-application-version.rst +0 -31
  364. awscli/examples/robomaker/create-robot-application.rst +0 -29
  365. awscli/examples/robomaker/create-robot.rst +0 -20
  366. awscli/examples/robomaker/create-simulation-application-version.rst +0 -39
  367. awscli/examples/robomaker/create-simulation-application.rst +0 -38
  368. awscli/examples/robomaker/create-simulation-job.rst +0 -43
  369. awscli/examples/robomaker/delete-fleet.rst +0 -7
  370. awscli/examples/robomaker/delete-robot-application.rst +0 -7
  371. awscli/examples/robomaker/delete-robot.rst +0 -7
  372. awscli/examples/robomaker/delete-simulation-application.rst +0 -7
  373. awscli/examples/robomaker/deregister-robot.rst +0 -14
  374. awscli/examples/robomaker/describe-deployment-job.rst +0 -38
  375. awscli/examples/robomaker/describe-fleet.rst +0 -28
  376. awscli/examples/robomaker/describe-robot-application.rst +0 -29
  377. awscli/examples/robomaker/describe-robot.rst +0 -21
  378. awscli/examples/robomaker/describe-simulation-application.rst +0 -37
  379. awscli/examples/robomaker/describe-simulation-job.rst +0 -45
  380. awscli/examples/robomaker/list-deployment-jobs.rst +0 -57
  381. awscli/examples/robomaker/list-fleets.rst +0 -22
  382. awscli/examples/robomaker/list-robot-applications.rst +0 -32
  383. awscli/examples/robomaker/list-robots.rst +0 -45
  384. awscli/examples/robomaker/list-simulation-applications.rst +0 -50
  385. awscli/examples/robomaker/list-simulation-jobs.rst +0 -80
  386. awscli/examples/robomaker/list-tags-for-resource.rst +0 -16
  387. awscli/examples/robomaker/register-robot.rst +0 -14
  388. awscli/examples/robomaker/restart-simulation-job.rst +0 -7
  389. awscli/examples/robomaker/sync-deployment-job.rst +0 -30
  390. awscli/examples/robomaker/tag-resource.rst +0 -7
  391. awscli/examples/robomaker/untag-resource.rst +0 -7
  392. awscli/examples/robomaker/update-robot-application.rst +0 -28
  393. awscli/examples/robomaker/update-simulation-application.rst +0 -36
  394. {awscli-1.40.17.data → awscli-1.44.26.data}/scripts/aws +0 -0
  395. {awscli-1.40.17.data → awscli-1.44.26.data}/scripts/aws.cmd +0 -0
  396. {awscli-1.40.17.data → awscli-1.44.26.data}/scripts/aws_bash_completer +0 -0
  397. {awscli-1.40.17.data → awscli-1.44.26.data}/scripts/aws_completer +0 -0
  398. {awscli-1.40.17.data → awscli-1.44.26.data}/scripts/aws_zsh_completer.sh +0 -0
  399. {awscli-1.40.17.dist-info → awscli-1.44.26.dist-info}/LICENSE.txt +0 -0
  400. {awscli-1.40.17.dist-info → awscli-1.44.26.dist-info}/WHEEL +0 -0
  401. {awscli-1.40.17.dist-info → awscli-1.44.26.dist-info}/top_level.txt +0 -0
@@ -12,136 +12,222 @@
12
12
  # language governing permissions and limitations under the License.
13
13
 
14
14
  import re
15
+
16
+ from botocore.compat import json
17
+
15
18
  from awscli.customizations.commands import BasicCommand
16
- from awscli.customizations.emr import applicationutils
17
- from awscli.customizations.emr import argumentschema
18
- from awscli.customizations.emr import constants
19
- from awscli.customizations.emr import emrfsutils
20
- from awscli.customizations.emr import emrutils
21
- from awscli.customizations.emr import exceptions
22
- from awscli.customizations.emr import hbaseutils
23
- from awscli.customizations.emr import helptext
24
- from awscli.customizations.emr import instancegroupsutils
25
- from awscli.customizations.emr import instancefleetsutils
26
- from awscli.customizations.emr import steputils
19
+ from awscli.customizations.emr import (
20
+ applicationutils,
21
+ argumentschema,
22
+ constants,
23
+ emrfsutils,
24
+ emrutils,
25
+ exceptions,
26
+ hbaseutils,
27
+ helptext,
28
+ instancefleetsutils,
29
+ instancegroupsutils,
30
+ steputils,
31
+ )
27
32
  from awscli.customizations.emr.command import Command
28
- from awscli.customizations.emr.constants import EC2_ROLE_NAME
29
- from awscli.customizations.emr.constants import EMR_ROLE_NAME
30
- from botocore.compat import json
33
+ from awscli.customizations.emr.constants import EC2_ROLE_NAME, EMR_ROLE_NAME
31
34
 
32
35
 
33
36
  class CreateCluster(Command):
34
37
  NAME = 'create-cluster'
35
38
  DESCRIPTION = helptext.CREATE_CLUSTER_DESCRIPTION
36
39
  ARG_TABLE = [
37
- {'name': 'release-label',
38
- 'help_text': helptext.RELEASE_LABEL},
39
- {'name': 'os-release-label',
40
- 'help_text': helptext.OS_RELEASE_LABEL},
41
- {'name': 'ami-version',
42
- 'help_text': helptext.AMI_VERSION},
43
- {'name': 'instance-groups',
44
- 'schema': argumentschema.INSTANCE_GROUPS_SCHEMA,
45
- 'help_text': helptext.INSTANCE_GROUPS},
46
- {'name': 'instance-type',
47
- 'help_text': helptext.INSTANCE_TYPE},
48
- {'name': 'instance-count',
49
- 'help_text': helptext.INSTANCE_COUNT},
50
- {'name': 'auto-terminate', 'action': 'store_true',
51
- 'group_name': 'auto_terminate',
52
- 'help_text': helptext.AUTO_TERMINATE},
53
- {'name': 'no-auto-terminate', 'action': 'store_true',
54
- 'group_name': 'auto_terminate'},
55
- {'name': 'instance-fleets',
56
- 'schema': argumentschema.INSTANCE_FLEETS_SCHEMA,
57
- 'help_text': helptext.INSTANCE_FLEETS},
58
- {'name': 'name',
59
- 'default': 'Development Cluster',
60
- 'help_text': helptext.CLUSTER_NAME},
61
- {'name': 'log-uri',
62
- 'help_text': helptext.LOG_URI},
63
- {'name': 'log-encryption-kms-key-id',
64
- 'help_text': helptext.LOG_ENCRYPTION_KMS_KEY_ID},
65
- {'name': 'service-role',
66
- 'help_text': helptext.SERVICE_ROLE},
67
- {'name': 'auto-scaling-role',
68
- 'help_text': helptext.AUTOSCALING_ROLE},
69
- {'name': 'use-default-roles', 'action': 'store_true',
70
- 'help_text': helptext.USE_DEFAULT_ROLES},
71
- {'name': 'configurations',
72
- 'help_text': helptext.CONFIGURATIONS},
73
- {'name': 'ec2-attributes',
74
- 'help_text': helptext.EC2_ATTRIBUTES,
75
- 'schema': argumentschema.EC2_ATTRIBUTES_SCHEMA},
76
- {'name': 'termination-protected', 'action': 'store_true',
77
- 'group_name': 'termination_protected',
78
- 'help_text': helptext.TERMINATION_PROTECTED},
79
- {'name': 'no-termination-protected', 'action': 'store_true',
80
- 'group_name': 'termination_protected'},
81
- {'name': 'unhealthy-node-replacement', 'action': 'store_true',
82
- 'group_name': 'unhealthy_node_replacement',
83
- 'help_text': helptext.UNHEALTHY_NODE_REPLACEMENT},
84
- {'name': 'no-unhealthy-node-replacement', 'action': 'store_true',
85
- 'group_name': 'unhealthy_node_replacement'},
86
- {'name': 'scale-down-behavior',
87
- 'help_text': helptext.SCALE_DOWN_BEHAVIOR},
88
- {'name': 'visible-to-all-users', 'action': 'store_true',
89
- 'group_name': 'visibility',
90
- 'help_text': helptext.VISIBILITY},
91
- {'name': 'no-visible-to-all-users', 'action': 'store_true',
92
- 'group_name': 'visibility'},
93
- {'name': 'enable-debugging', 'action': 'store_true',
94
- 'group_name': 'debug',
95
- 'help_text': helptext.DEBUGGING},
96
- {'name': 'no-enable-debugging', 'action': 'store_true',
97
- 'group_name': 'debug'},
98
- {'name': 'tags', 'nargs': '+',
99
- 'help_text': helptext.TAGS,
100
- 'schema': argumentschema.TAGS_SCHEMA},
101
- {'name': 'bootstrap-actions',
102
- 'help_text': helptext.BOOTSTRAP_ACTIONS,
103
- 'schema': argumentschema.BOOTSTRAP_ACTIONS_SCHEMA},
104
- {'name': 'applications',
105
- 'help_text': helptext.APPLICATIONS,
106
- 'schema': argumentschema.APPLICATIONS_SCHEMA},
107
- {'name': 'emrfs',
108
- 'help_text': helptext.EMR_FS,
109
- 'schema': argumentschema.EMR_FS_SCHEMA},
110
- {'name': 'steps',
111
- 'schema': argumentschema.STEPS_SCHEMA,
112
- 'help_text': helptext.STEPS},
113
- {'name': 'additional-info',
114
- 'help_text': helptext.ADDITIONAL_INFO},
115
- {'name': 'restore-from-hbase-backup',
116
- 'schema': argumentschema.HBASE_RESTORE_FROM_BACKUP_SCHEMA,
117
- 'help_text': helptext.RESTORE_FROM_HBASE},
118
- {'name': 'security-configuration',
119
- 'help_text': helptext.SECURITY_CONFIG},
120
- {'name': 'custom-ami-id',
121
- 'help_text' : helptext.CUSTOM_AMI_ID},
122
- {'name': 'ebs-root-volume-size',
123
- 'help_text' : helptext.EBS_ROOT_VOLUME_SIZE},
124
- {'name': 'ebs-root-volume-iops',
125
- 'help_text' : helptext.EBS_ROOT_VOLUME_IOPS},
126
- {'name': 'ebs-root-volume-throughput',
127
- 'help_text' : helptext.EBS_ROOT_VOLUME_THROUGHPUT},
128
- {'name': 'repo-upgrade-on-boot',
129
- 'help_text' : helptext.REPO_UPGRADE_ON_BOOT},
130
- {'name': 'kerberos-attributes',
131
- 'schema': argumentschema.KERBEROS_ATTRIBUTES_SCHEMA,
132
- 'help_text': helptext.KERBEROS_ATTRIBUTES},
133
- {'name': 'step-concurrency-level',
134
- 'cli_type_name': 'integer',
135
- 'help_text': helptext.STEP_CONCURRENCY_LEVEL},
136
- {'name': 'managed-scaling-policy',
137
- 'schema': argumentschema.MANAGED_SCALING_POLICY_SCHEMA,
138
- 'help_text': helptext.MANAGED_SCALING_POLICY},
139
- {'name': 'placement-group-configs',
140
- 'schema': argumentschema.PLACEMENT_GROUP_CONFIGS_SCHEMA,
141
- 'help_text': helptext.PLACEMENT_GROUP_CONFIGS},
142
- {'name': 'auto-termination-policy',
143
- 'schema': argumentschema.AUTO_TERMINATION_POLICY_SCHEMA,
144
- 'help_text': helptext.AUTO_TERMINATION_POLICY}
40
+ {'name': 'release-label', 'help_text': helptext.RELEASE_LABEL},
41
+ {'name': 'os-release-label', 'help_text': helptext.OS_RELEASE_LABEL},
42
+ {'name': 'ami-version', 'help_text': helptext.AMI_VERSION},
43
+ {
44
+ 'name': 'instance-groups',
45
+ 'schema': argumentschema.INSTANCE_GROUPS_SCHEMA,
46
+ 'help_text': helptext.INSTANCE_GROUPS,
47
+ },
48
+ {'name': 'instance-type', 'help_text': helptext.INSTANCE_TYPE},
49
+ {'name': 'instance-count', 'help_text': helptext.INSTANCE_COUNT},
50
+ {
51
+ 'name': 'auto-terminate',
52
+ 'action': 'store_true',
53
+ 'group_name': 'auto_terminate',
54
+ 'help_text': helptext.AUTO_TERMINATE,
55
+ },
56
+ {
57
+ 'name': 'no-auto-terminate',
58
+ 'action': 'store_true',
59
+ 'group_name': 'auto_terminate',
60
+ },
61
+ {
62
+ 'name': 'instance-fleets',
63
+ 'schema': argumentschema.INSTANCE_FLEETS_SCHEMA,
64
+ 'help_text': helptext.INSTANCE_FLEETS,
65
+ },
66
+ {
67
+ 'name': 'name',
68
+ 'default': 'Development Cluster',
69
+ 'help_text': helptext.CLUSTER_NAME,
70
+ },
71
+ {'name': 'log-uri', 'help_text': helptext.LOG_URI},
72
+ {
73
+ 'name': 'log-encryption-kms-key-id',
74
+ 'help_text': helptext.LOG_ENCRYPTION_KMS_KEY_ID,
75
+ },
76
+ {'name': 'service-role', 'help_text': helptext.SERVICE_ROLE},
77
+ {'name': 'auto-scaling-role', 'help_text': helptext.AUTOSCALING_ROLE},
78
+ {
79
+ 'name': 'use-default-roles',
80
+ 'action': 'store_true',
81
+ 'help_text': helptext.USE_DEFAULT_ROLES,
82
+ },
83
+ {'name': 'configurations', 'help_text': helptext.CONFIGURATIONS},
84
+ {
85
+ 'name': 'ec2-attributes',
86
+ 'help_text': helptext.EC2_ATTRIBUTES,
87
+ 'schema': argumentschema.EC2_ATTRIBUTES_SCHEMA,
88
+ },
89
+ {
90
+ 'name': 'termination-protected',
91
+ 'action': 'store_true',
92
+ 'group_name': 'termination_protected',
93
+ 'help_text': helptext.TERMINATION_PROTECTED,
94
+ },
95
+ {
96
+ 'name': 'no-termination-protected',
97
+ 'action': 'store_true',
98
+ 'group_name': 'termination_protected',
99
+ },
100
+ {
101
+ 'name': 'unhealthy-node-replacement',
102
+ 'action': 'store_true',
103
+ 'group_name': 'unhealthy_node_replacement',
104
+ 'help_text': helptext.UNHEALTHY_NODE_REPLACEMENT,
105
+ },
106
+ {
107
+ 'name': 'no-unhealthy-node-replacement',
108
+ 'action': 'store_true',
109
+ 'group_name': 'unhealthy_node_replacement',
110
+ },
111
+ {
112
+ 'name': 'scale-down-behavior',
113
+ 'help_text': helptext.SCALE_DOWN_BEHAVIOR,
114
+ },
115
+ {
116
+ 'name': 'visible-to-all-users',
117
+ 'action': 'store_true',
118
+ 'group_name': 'visibility',
119
+ 'help_text': helptext.VISIBILITY,
120
+ },
121
+ {
122
+ 'name': 'no-visible-to-all-users',
123
+ 'action': 'store_true',
124
+ 'group_name': 'visibility',
125
+ },
126
+ {
127
+ 'name': 'enable-debugging',
128
+ 'action': 'store_true',
129
+ 'group_name': 'debug',
130
+ 'help_text': helptext.DEBUGGING,
131
+ },
132
+ {
133
+ 'name': 'no-enable-debugging',
134
+ 'action': 'store_true',
135
+ 'group_name': 'debug',
136
+ },
137
+ {
138
+ 'name': 'tags',
139
+ 'nargs': '+',
140
+ 'help_text': helptext.TAGS,
141
+ 'schema': argumentschema.TAGS_SCHEMA,
142
+ },
143
+ {
144
+ 'name': 'bootstrap-actions',
145
+ 'help_text': helptext.BOOTSTRAP_ACTIONS,
146
+ 'schema': argumentschema.BOOTSTRAP_ACTIONS_SCHEMA,
147
+ },
148
+ {
149
+ 'name': 'applications',
150
+ 'help_text': helptext.APPLICATIONS,
151
+ 'schema': argumentschema.APPLICATIONS_SCHEMA,
152
+ },
153
+ {
154
+ 'name': 'emrfs',
155
+ 'help_text': helptext.EMR_FS,
156
+ 'schema': argumentschema.EMR_FS_SCHEMA,
157
+ },
158
+ {
159
+ 'name': 'steps',
160
+ 'schema': argumentschema.STEPS_SCHEMA,
161
+ 'help_text': helptext.STEPS,
162
+ },
163
+ {'name': 'additional-info', 'help_text': helptext.ADDITIONAL_INFO},
164
+ {
165
+ 'name': 'restore-from-hbase-backup',
166
+ 'schema': argumentschema.HBASE_RESTORE_FROM_BACKUP_SCHEMA,
167
+ 'help_text': helptext.RESTORE_FROM_HBASE,
168
+ },
169
+ {
170
+ 'name': 'security-configuration',
171
+ 'help_text': helptext.SECURITY_CONFIG,
172
+ },
173
+ {'name': 'custom-ami-id', 'help_text': helptext.CUSTOM_AMI_ID},
174
+ {
175
+ 'name': 'ebs-root-volume-size',
176
+ 'help_text': helptext.EBS_ROOT_VOLUME_SIZE,
177
+ },
178
+ {
179
+ 'name': 'ebs-root-volume-iops',
180
+ 'help_text': helptext.EBS_ROOT_VOLUME_IOPS,
181
+ },
182
+ {
183
+ 'name': 'ebs-root-volume-throughput',
184
+ 'help_text': helptext.EBS_ROOT_VOLUME_THROUGHPUT,
185
+ },
186
+ {
187
+ 'name': 'repo-upgrade-on-boot',
188
+ 'help_text': helptext.REPO_UPGRADE_ON_BOOT,
189
+ },
190
+ {
191
+ 'name': 'kerberos-attributes',
192
+ 'schema': argumentschema.KERBEROS_ATTRIBUTES_SCHEMA,
193
+ 'help_text': helptext.KERBEROS_ATTRIBUTES,
194
+ },
195
+ {
196
+ 'name': 'step-concurrency-level',
197
+ 'cli_type_name': 'integer',
198
+ 'help_text': helptext.STEP_CONCURRENCY_LEVEL,
199
+ },
200
+ {
201
+ 'name': 'managed-scaling-policy',
202
+ 'schema': argumentschema.MANAGED_SCALING_POLICY_SCHEMA,
203
+ 'help_text': helptext.MANAGED_SCALING_POLICY,
204
+ },
205
+ {
206
+ 'name': 'placement-group-configs',
207
+ 'schema': argumentschema.PLACEMENT_GROUP_CONFIGS_SCHEMA,
208
+ 'help_text': helptext.PLACEMENT_GROUP_CONFIGS,
209
+ },
210
+ {
211
+ 'name': 'auto-termination-policy',
212
+ 'schema': argumentschema.AUTO_TERMINATION_POLICY_SCHEMA,
213
+ 'help_text': helptext.AUTO_TERMINATION_POLICY,
214
+ },
215
+ {
216
+ 'name': 'monitoring-configuration',
217
+ 'schema': argumentschema.MONITORING_CONFIGURATION_SCHEMA,
218
+ 'help_text': helptext.MONITORING_CONFIGURATION,
219
+ },
220
+ {
221
+ 'name': 'extended-support',
222
+ 'action': 'store_true',
223
+ 'group_name': 'extended-support',
224
+ 'help_text': helptext.EXTENDED_SUPPORT,
225
+ },
226
+ {
227
+ 'name': 'no-extended-support',
228
+ 'action': 'store_true',
229
+ 'group_name': 'extended-support',
230
+ },
145
231
  ]
146
232
  SYNOPSIS = BasicCommand.FROM_FILE('emr', 'create-cluster-synopsis.txt')
147
233
  EXAMPLES = BasicCommand.FROM_FILE('emr', 'create-cluster-examples.rst')
@@ -154,71 +240,95 @@ class CreateCluster(Command):
154
240
 
155
241
  service_role_validation_message = (
156
242
  " Either choose --use-default-roles or use both --service-role "
157
- "<roleName> and --ec2-attributes InstanceProfile=<profileName>.")
243
+ "<roleName> and --ec2-attributes InstanceProfile=<profileName>."
244
+ )
158
245
 
159
- if parsed_args.use_default_roles is True and \
160
- parsed_args.service_role is not None:
246
+ if (
247
+ parsed_args.use_default_roles is True
248
+ and parsed_args.service_role is not None
249
+ ):
161
250
  raise exceptions.MutualExclusiveOptionError(
162
251
  option1="--use-default-roles",
163
252
  option2="--service-role",
164
- message=service_role_validation_message)
253
+ message=service_role_validation_message,
254
+ )
165
255
 
166
- if parsed_args.use_default_roles is True and \
167
- parsed_args.ec2_attributes is not None and \
168
- 'InstanceProfile' in parsed_args.ec2_attributes:
256
+ if (
257
+ parsed_args.use_default_roles is True
258
+ and parsed_args.ec2_attributes is not None
259
+ and 'InstanceProfile' in parsed_args.ec2_attributes
260
+ ):
169
261
  raise exceptions.MutualExclusiveOptionError(
170
262
  option1="--use-default-roles",
171
263
  option2="--ec2-attributes InstanceProfile",
172
- message=service_role_validation_message)
264
+ message=service_role_validation_message,
265
+ )
173
266
 
174
- if parsed_args.instance_groups is not None and \
175
- parsed_args.instance_fleets is not None:
267
+ if (
268
+ parsed_args.instance_groups is not None
269
+ and parsed_args.instance_fleets is not None
270
+ ):
176
271
  raise exceptions.MutualExclusiveOptionError(
177
- option1="--instance-groups",
178
- option2="--instance-fleets")
272
+ option1="--instance-groups", option2="--instance-fleets"
273
+ )
179
274
 
180
275
  instances_config = {}
181
276
  if parsed_args.instance_fleets is not None:
182
- instances_config['InstanceFleets'] = \
277
+ instances_config['InstanceFleets'] = (
183
278
  instancefleetsutils.validate_and_build_instance_fleets(
184
- parsed_args.instance_fleets)
279
+ parsed_args.instance_fleets
280
+ )
281
+ )
185
282
  else:
186
- instances_config['InstanceGroups'] = \
283
+ instances_config['InstanceGroups'] = (
187
284
  instancegroupsutils.validate_and_build_instance_groups(
188
285
  instance_groups=parsed_args.instance_groups,
189
286
  instance_type=parsed_args.instance_type,
190
- instance_count=parsed_args.instance_count)
287
+ instance_count=parsed_args.instance_count,
288
+ )
289
+ )
191
290
 
192
291
  if parsed_args.release_label is not None:
193
292
  params["ReleaseLabel"] = parsed_args.release_label
194
293
  if parsed_args.configurations is not None:
195
294
  try:
196
295
  params["Configurations"] = json.loads(
197
- parsed_args.configurations)
296
+ parsed_args.configurations
297
+ )
198
298
  except ValueError:
199
- raise ValueError('aws: error: invalid json argument for '
200
- 'option --configurations')
299
+ raise ValueError(
300
+ 'aws: error: invalid json argument for '
301
+ 'option --configurations'
302
+ )
201
303
 
202
304
  if (
203
305
  parsed_args.release_label is None
204
306
  and parsed_args.ami_version is not None
205
307
  ):
206
- is_valid_ami_version = re.match(r'\d?\..*', parsed_args.ami_version)
308
+ is_valid_ami_version = re.match(
309
+ r'\d?\..*', parsed_args.ami_version
310
+ )
207
311
  if is_valid_ami_version is None:
208
312
  raise exceptions.InvalidAmiVersionError(
209
- ami_version=parsed_args.ami_version)
313
+ ami_version=parsed_args.ami_version
314
+ )
210
315
  params['AmiVersion'] = parsed_args.ami_version
211
316
  emrutils.apply_dict(
212
- params, 'AdditionalInfo', parsed_args.additional_info)
317
+ params, 'AdditionalInfo', parsed_args.additional_info
318
+ )
213
319
  emrutils.apply_dict(params, 'LogUri', parsed_args.log_uri)
214
320
 
215
321
  if parsed_args.os_release_label is not None:
216
- emrutils.apply_dict(params, 'OSReleaseLabel',
217
- parsed_args.os_release_label)
322
+ emrutils.apply_dict(
323
+ params, 'OSReleaseLabel', parsed_args.os_release_label
324
+ )
218
325
 
219
326
  if parsed_args.log_encryption_kms_key_id is not None:
220
- emrutils.apply_dict(params, 'LogEncryptionKmsKeyId',
221
- parsed_args.log_encryption_kms_key_id)
327
+ emrutils.apply_dict(
328
+ params,
329
+ 'LogEncryptionKmsKeyId',
330
+ parsed_args.log_encryption_kms_key_id,
331
+ )
222
332
 
223
333
  if parsed_args.use_default_roles is True:
224
334
  parsed_args.service_role = EMR_ROLE_NAME
@@ -234,61 +344,79 @@ class CreateCluster(Command):
234
344
  if parsed_args.auto_scaling_role is None:
235
345
  raise exceptions.MissingAutoScalingRoleError()
236
346
 
237
- emrutils.apply_dict(params, 'AutoScalingRole', parsed_args.auto_scaling_role)
347
+ emrutils.apply_dict(
348
+ params, 'AutoScalingRole', parsed_args.auto_scaling_role
349
+ )
238
350
 
239
351
  if parsed_args.scale_down_behavior is not None:
240
- emrutils.apply_dict(params, 'ScaleDownBehavior', parsed_args.scale_down_behavior)
352
+ emrutils.apply_dict(
353
+ params, 'ScaleDownBehavior', parsed_args.scale_down_behavior
354
+ )
241
355
 
242
356
  if (
243
- parsed_args.no_auto_terminate is False and
244
- parsed_args.auto_terminate is False):
357
+ parsed_args.no_auto_terminate is False
358
+ and parsed_args.auto_terminate is False
359
+ ):
245
360
  parsed_args.no_auto_terminate = True
246
361
 
247
- instances_config['KeepJobFlowAliveWhenNoSteps'] = \
362
+ instances_config['KeepJobFlowAliveWhenNoSteps'] = (
248
363
  emrutils.apply_boolean_options(
249
364
  parsed_args.no_auto_terminate,
250
365
  '--no-auto-terminate',
251
366
  parsed_args.auto_terminate,
252
- '--auto-terminate')
367
+ '--auto-terminate',
368
+ )
369
+ )
253
370
 
254
- instances_config['TerminationProtected'] = \
371
+ instances_config['TerminationProtected'] = (
255
372
  emrutils.apply_boolean_options(
256
373
  parsed_args.termination_protected,
257
374
  '--termination-protected',
258
375
  parsed_args.no_termination_protected,
259
- '--no-termination-protected')
260
-
261
- if (parsed_args.unhealthy_node_replacement or parsed_args.no_unhealthy_node_replacement):
262
- instances_config['UnhealthyNodeReplacement'] = \
263
- emrutils.apply_boolean_options(
264
- parsed_args.unhealthy_node_replacement,
265
- '--unhealthy-node-replacement',
266
- parsed_args.no_unhealthy_node_replacement,
267
- '--no-unhealthy-node-replacement')
376
+ '--no-termination-protected',
377
+ )
378
+ )
379
+
380
+ if (
381
+ parsed_args.unhealthy_node_replacement
382
+ or parsed_args.no_unhealthy_node_replacement
383
+ ):
384
+ instances_config['UnhealthyNodeReplacement'] = (
385
+ emrutils.apply_boolean_options(
386
+ parsed_args.unhealthy_node_replacement,
387
+ '--unhealthy-node-replacement',
388
+ parsed_args.no_unhealthy_node_replacement,
389
+ '--no-unhealthy-node-replacement',
390
+ )
391
+ )
268
392
 
269
- if (parsed_args.visible_to_all_users is False and
270
- parsed_args.no_visible_to_all_users is False):
393
+ if (
394
+ parsed_args.visible_to_all_users is False
395
+ and parsed_args.no_visible_to_all_users is False
396
+ ):
271
397
  parsed_args.visible_to_all_users = True
272
398
 
273
- params['VisibleToAllUsers'] = \
274
- emrutils.apply_boolean_options(
275
- parsed_args.visible_to_all_users,
276
- '--visible-to-all-users',
277
- parsed_args.no_visible_to_all_users,
278
- '--no-visible-to-all-users')
399
+ params['VisibleToAllUsers'] = emrutils.apply_boolean_options(
400
+ parsed_args.visible_to_all_users,
401
+ '--visible-to-all-users',
402
+ parsed_args.no_visible_to_all_users,
403
+ '--no-visible-to-all-users',
404
+ )
279
405
 
280
406
  params['Tags'] = emrutils.parse_tags(parsed_args.tags)
281
407
  params['Instances'] = instances_config
282
408
 
283
409
  if parsed_args.ec2_attributes is not None:
284
410
  self._build_ec2_attributes(
285
- cluster=params, parsed_attrs=parsed_args.ec2_attributes)
411
+ cluster=params, parsed_attrs=parsed_args.ec2_attributes
412
+ )
286
413
 
287
414
  debugging_enabled = emrutils.apply_boolean_options(
288
415
  parsed_args.enable_debugging,
289
416
  '--enable-debugging',
290
417
  parsed_args.no_enable_debugging,
291
- '--no-enable-debugging')
418
+ '--no-enable-debugging',
419
+ )
292
420
 
293
421
  if parsed_args.log_uri is None and debugging_enabled is True:
294
422
  raise exceptions.LogUriError
@@ -298,21 +426,24 @@ class CreateCluster(Command):
298
426
  cluster=params,
299
427
  key='Steps',
300
428
  value=[
301
- self._build_enable_debugging(parsed_args, parsed_globals)])
429
+ self._build_enable_debugging(parsed_args, parsed_globals)
430
+ ],
431
+ )
302
432
 
303
433
  if parsed_args.applications is not None:
304
434
  if parsed_args.release_label is None:
305
- app_list, ba_list, step_list = \
435
+ app_list, ba_list, step_list = (
306
436
  applicationutils.build_applications(
307
437
  region=self.region,
308
438
  parsed_applications=parsed_args.applications,
309
- ami_version=params['AmiVersion'])
310
- self._update_cluster_dict(
311
- params, 'NewSupportedProducts', app_list)
312
- self._update_cluster_dict(
313
- params, 'BootstrapActions', ba_list)
439
+ ami_version=params['AmiVersion'],
440
+ )
441
+ )
314
442
  self._update_cluster_dict(
315
- params, 'Steps', step_list)
443
+ params, 'NewSupportedProducts', app_list
444
+ )
445
+ self._update_cluster_dict(params, 'BootstrapActions', ba_list)
446
+ self._update_cluster_dict(params, 'Steps', step_list)
316
447
  else:
317
448
  params["Applications"] = []
318
449
  for application in parsed_args.applications:
@@ -322,37 +453,45 @@ class CreateCluster(Command):
322
453
  if hbase_restore_config is not None:
323
454
  args = hbaseutils.build_hbase_restore_from_backup_args(
324
455
  dir=hbase_restore_config.get('Dir'),
325
- backup_version=hbase_restore_config.get('BackupVersion'))
456
+ backup_version=hbase_restore_config.get('BackupVersion'),
457
+ )
326
458
  step_config = emrutils.build_step(
327
459
  jar=constants.HBASE_JAR_PATH,
328
460
  name=constants.HBASE_RESTORE_STEP_NAME,
329
461
  action_on_failure=constants.CANCEL_AND_WAIT,
330
- args=args)
331
- self._update_cluster_dict(
332
- params, 'Steps', [step_config])
462
+ args=args,
463
+ )
464
+ self._update_cluster_dict(params, 'Steps', [step_config])
333
465
 
334
466
  if parsed_args.bootstrap_actions is not None:
335
467
  self._build_bootstrap_actions(
336
468
  cluster=params,
337
- parsed_boostrap_actions=parsed_args.bootstrap_actions)
469
+ parsed_boostrap_actions=parsed_args.bootstrap_actions,
470
+ )
338
471
 
339
472
  if parsed_args.emrfs is not None:
340
473
  self._handle_emrfs_parameters(
341
474
  cluster=params,
342
475
  emrfs_args=parsed_args.emrfs,
343
- release_label=parsed_args.release_label)
476
+ release_label=parsed_args.release_label,
477
+ )
344
478
 
345
479
  if parsed_args.steps is not None:
346
480
  steps_list = steputils.build_step_config_list(
347
481
  parsed_step_list=parsed_args.steps,
348
482
  region=self.region,
349
- release_label=parsed_args.release_label)
483
+ release_label=parsed_args.release_label,
484
+ )
350
485
  self._update_cluster_dict(
351
- cluster=params, key='Steps', value=steps_list)
486
+ cluster=params, key='Steps', value=steps_list
487
+ )
352
488
 
353
489
  if parsed_args.security_configuration is not None:
354
490
  emrutils.apply_dict(
355
- params, 'SecurityConfiguration', parsed_args.security_configuration)
491
+ params,
492
+ 'SecurityConfiguration',
493
+ parsed_args.security_configuration,
494
+ )
356
495
 
357
496
  if parsed_args.custom_ami_id is not None:
358
497
  emrutils.apply_dict(
@@ -360,15 +499,21 @@ class CreateCluster(Command):
360
499
  )
361
500
  if parsed_args.ebs_root_volume_size is not None:
362
501
  emrutils.apply_dict(
363
- params, 'EbsRootVolumeSize', int(parsed_args.ebs_root_volume_size)
502
+ params,
503
+ 'EbsRootVolumeSize',
504
+ int(parsed_args.ebs_root_volume_size),
364
505
  )
365
506
  if parsed_args.ebs_root_volume_iops is not None:
366
507
  emrutils.apply_dict(
367
- params, 'EbsRootVolumeIops', int(parsed_args.ebs_root_volume_iops)
508
+ params,
509
+ 'EbsRootVolumeIops',
510
+ int(parsed_args.ebs_root_volume_iops),
368
511
  )
369
512
  if parsed_args.ebs_root_volume_throughput is not None:
370
513
  emrutils.apply_dict(
371
- params, 'EbsRootVolumeThroughput', int(parsed_args.ebs_root_volume_throughput)
514
+ params,
515
+ 'EbsRootVolumeThroughput',
516
+ int(parsed_args.ebs_root_volume_throughput),
372
517
  )
373
518
 
374
519
  if parsed_args.repo_upgrade_on_boot is not None:
@@ -378,34 +523,63 @@ class CreateCluster(Command):
378
523
 
379
524
  if parsed_args.kerberos_attributes is not None:
380
525
  emrutils.apply_dict(
381
- params, 'KerberosAttributes', parsed_args.kerberos_attributes)
526
+ params, 'KerberosAttributes', parsed_args.kerberos_attributes
527
+ )
382
528
 
383
529
  if parsed_args.step_concurrency_level is not None:
384
530
  params['StepConcurrencyLevel'] = parsed_args.step_concurrency_level
385
531
 
532
+ if parsed_args.extended_support or parsed_args.no_extended_support:
533
+ params['ExtendedSupport'] = emrutils.apply_boolean_options(
534
+ parsed_args.extended_support,
535
+ '--extended-support',
536
+ parsed_args.no_extended_support,
537
+ '--no-extended-support',
538
+ )
539
+
386
540
  if parsed_args.managed_scaling_policy is not None:
387
541
  emrutils.apply_dict(
388
- params, 'ManagedScalingPolicy', parsed_args.managed_scaling_policy)
542
+ params,
543
+ 'ManagedScalingPolicy',
544
+ parsed_args.managed_scaling_policy,
545
+ )
389
546
 
390
547
  if parsed_args.placement_group_configs is not None:
391
548
  emrutils.apply_dict(
392
- params, 'PlacementGroupConfigs',
393
- parsed_args.placement_group_configs)
549
+ params,
550
+ 'PlacementGroupConfigs',
551
+ parsed_args.placement_group_configs,
552
+ )
394
553
 
395
554
  if parsed_args.auto_termination_policy is not None:
396
555
  emrutils.apply_dict(
397
- params, 'AutoTerminationPolicy',
398
- parsed_args.auto_termination_policy)
556
+ params,
557
+ 'AutoTerminationPolicy',
558
+ parsed_args.auto_termination_policy,
559
+ )
560
+
561
+ if parsed_args.monitoring_configuration is not None:
562
+ emrutils.apply_dict(
563
+ params,
564
+ 'MonitoringConfiguration',
565
+ parsed_args.monitoring_configuration,
566
+ )
399
567
 
400
568
  self._validate_required_applications(parsed_args)
401
569
 
402
570
  run_job_flow_response = emrutils.call(
403
- self._session, 'run_job_flow', params, self.region,
404
- parsed_globals.endpoint_url, parsed_globals.verify_ssl)
571
+ self._session,
572
+ 'run_job_flow',
573
+ params,
574
+ self.region,
575
+ parsed_globals.endpoint_url,
576
+ parsed_globals.verify_ssl,
577
+ )
405
578
 
406
579
  constructed_result = self._construct_result(run_job_flow_response)
407
- emrutils.display_response(self._session, 'run_job_flow',
408
- constructed_result, parsed_globals)
580
+ emrutils.display_response(
581
+ self._session, 'run_job_flow', constructed_result, parsed_globals
582
+ )
409
583
 
410
584
  return 0
411
585
 
@@ -417,8 +591,7 @@ class CreateCluster(Command):
417
591
  clusterArn = run_job_flow_result.get('ClusterArn')
418
592
 
419
593
  if jobFlowId is not None:
420
- return {'ClusterId': jobFlowId,
421
- 'ClusterArn': clusterArn }
594
+ return {'ClusterId': jobFlowId, 'ClusterArn': clusterArn}
422
595
  else:
423
596
  return {}
424
597
 
@@ -426,83 +599,118 @@ class CreateCluster(Command):
426
599
  keys = parsed_attrs.keys()
427
600
  instances = cluster['Instances']
428
601
 
429
- if ('SubnetId' in keys and 'SubnetIds' in keys):
602
+ if 'SubnetId' in keys and 'SubnetIds' in keys:
430
603
  raise exceptions.MutualExclusiveOptionError(
431
- option1="SubnetId",
432
- option2="SubnetIds")
604
+ option1="SubnetId", option2="SubnetIds"
605
+ )
433
606
 
434
- if ('AvailabilityZone' in keys and 'AvailabilityZones' in keys):
607
+ if 'AvailabilityZone' in keys and 'AvailabilityZones' in keys:
435
608
  raise exceptions.MutualExclusiveOptionError(
436
- option1="AvailabilityZone",
437
- option2="AvailabilityZones")
609
+ option1="AvailabilityZone", option2="AvailabilityZones"
610
+ )
438
611
 
439
- if ('SubnetId' in keys or 'SubnetIds' in keys) \
440
- and ('AvailabilityZone' in keys or 'AvailabilityZones' in keys):
612
+ if ('SubnetId' in keys or 'SubnetIds' in keys) and (
613
+ 'AvailabilityZone' in keys or 'AvailabilityZones' in keys
614
+ ):
441
615
  raise exceptions.SubnetAndAzValidationError
442
616
 
443
617
  emrutils.apply_params(
444
- src_params=parsed_attrs, src_key='KeyName',
445
- dest_params=instances, dest_key='Ec2KeyName')
618
+ src_params=parsed_attrs,
619
+ src_key='KeyName',
620
+ dest_params=instances,
621
+ dest_key='Ec2KeyName',
622
+ )
446
623
  emrutils.apply_params(
447
- src_params=parsed_attrs, src_key='SubnetId',
448
- dest_params=instances, dest_key='Ec2SubnetId')
624
+ src_params=parsed_attrs,
625
+ src_key='SubnetId',
626
+ dest_params=instances,
627
+ dest_key='Ec2SubnetId',
628
+ )
449
629
  emrutils.apply_params(
450
- src_params=parsed_attrs, src_key='SubnetIds',
451
- dest_params=instances, dest_key='Ec2SubnetIds')
630
+ src_params=parsed_attrs,
631
+ src_key='SubnetIds',
632
+ dest_params=instances,
633
+ dest_key='Ec2SubnetIds',
634
+ )
452
635
 
453
636
  if 'AvailabilityZone' in keys:
454
637
  instances['Placement'] = dict()
455
638
  emrutils.apply_params(
456
- src_params=parsed_attrs, src_key='AvailabilityZone',
639
+ src_params=parsed_attrs,
640
+ src_key='AvailabilityZone',
457
641
  dest_params=instances['Placement'],
458
- dest_key='AvailabilityZone')
642
+ dest_key='AvailabilityZone',
643
+ )
459
644
 
460
645
  if 'AvailabilityZones' in keys:
461
646
  instances['Placement'] = dict()
462
647
  emrutils.apply_params(
463
- src_params=parsed_attrs, src_key='AvailabilityZones',
648
+ src_params=parsed_attrs,
649
+ src_key='AvailabilityZones',
464
650
  dest_params=instances['Placement'],
465
- dest_key='AvailabilityZones')
651
+ dest_key='AvailabilityZones',
652
+ )
466
653
 
467
654
  emrutils.apply_params(
468
- src_params=parsed_attrs, src_key='InstanceProfile',
469
- dest_params=cluster, dest_key='JobFlowRole')
655
+ src_params=parsed_attrs,
656
+ src_key='InstanceProfile',
657
+ dest_params=cluster,
658
+ dest_key='JobFlowRole',
659
+ )
470
660
 
471
661
  emrutils.apply_params(
472
- src_params=parsed_attrs, src_key='EmrManagedMasterSecurityGroup',
473
- dest_params=instances, dest_key='EmrManagedMasterSecurityGroup')
662
+ src_params=parsed_attrs,
663
+ src_key='EmrManagedMasterSecurityGroup',
664
+ dest_params=instances,
665
+ dest_key='EmrManagedMasterSecurityGroup',
666
+ )
474
667
 
475
668
  emrutils.apply_params(
476
- src_params=parsed_attrs, src_key='EmrManagedSlaveSecurityGroup',
477
- dest_params=instances, dest_key='EmrManagedSlaveSecurityGroup')
669
+ src_params=parsed_attrs,
670
+ src_key='EmrManagedSlaveSecurityGroup',
671
+ dest_params=instances,
672
+ dest_key='EmrManagedSlaveSecurityGroup',
673
+ )
478
674
 
479
675
  emrutils.apply_params(
480
- src_params=parsed_attrs, src_key='ServiceAccessSecurityGroup',
481
- dest_params=instances, dest_key='ServiceAccessSecurityGroup')
676
+ src_params=parsed_attrs,
677
+ src_key='ServiceAccessSecurityGroup',
678
+ dest_params=instances,
679
+ dest_key='ServiceAccessSecurityGroup',
680
+ )
482
681
 
483
682
  emrutils.apply_params(
484
- src_params=parsed_attrs, src_key='AdditionalMasterSecurityGroups',
485
- dest_params=instances, dest_key='AdditionalMasterSecurityGroups')
683
+ src_params=parsed_attrs,
684
+ src_key='AdditionalMasterSecurityGroups',
685
+ dest_params=instances,
686
+ dest_key='AdditionalMasterSecurityGroups',
687
+ )
486
688
 
487
689
  emrutils.apply_params(
488
- src_params=parsed_attrs, src_key='AdditionalSlaveSecurityGroups',
489
- dest_params=instances, dest_key='AdditionalSlaveSecurityGroups')
690
+ src_params=parsed_attrs,
691
+ src_key='AdditionalSlaveSecurityGroups',
692
+ dest_params=instances,
693
+ dest_key='AdditionalSlaveSecurityGroups',
694
+ )
490
695
 
491
696
  emrutils.apply(params=cluster, key='Instances', value=instances)
492
697
 
493
698
  return cluster
494
699
 
495
- def _build_bootstrap_actions(
496
- self, cluster, parsed_boostrap_actions):
700
+ def _build_bootstrap_actions(self, cluster, parsed_boostrap_actions):
497
701
  cluster_ba_list = cluster.get('BootstrapActions')
498
702
  if cluster_ba_list is None:
499
703
  cluster_ba_list = []
500
704
 
501
705
  bootstrap_actions = []
502
- if len(cluster_ba_list) + len(parsed_boostrap_actions) \
503
- > constants.MAX_BOOTSTRAP_ACTION_NUMBER:
504
- raise ValueError('aws: error: maximum number of '
505
- 'bootstrap actions for a cluster exceeded.')
706
+ if (
707
+ len(cluster_ba_list) + len(parsed_boostrap_actions)
708
+ > constants.MAX_BOOTSTRAP_ACTION_NUMBER
709
+ ):
710
+ raise ValueError(
711
+ 'aws: error: maximum number of '
712
+ 'bootstrap actions for a cluster exceeded.'
713
+ )
506
714
 
507
715
  for ba in parsed_boostrap_actions:
508
716
  ba_config = {}
@@ -512,15 +720,22 @@ class CreateCluster(Command):
512
720
  ba_config['Name'] = constants.BOOTSTRAP_ACTION_NAME
513
721
  script_arg_config = {}
514
722
  emrutils.apply_params(
515
- src_params=ba, src_key='Path',
516
- dest_params=script_arg_config, dest_key='Path')
723
+ src_params=ba,
724
+ src_key='Path',
725
+ dest_params=script_arg_config,
726
+ dest_key='Path',
727
+ )
517
728
  emrutils.apply_params(
518
- src_params=ba, src_key='Args',
519
- dest_params=script_arg_config, dest_key='Args')
729
+ src_params=ba,
730
+ src_key='Args',
731
+ dest_params=script_arg_config,
732
+ dest_key='Args',
733
+ )
520
734
  emrutils.apply(
521
735
  params=ba_config,
522
736
  key='ScriptBootstrapAction',
523
- value=script_arg_config)
737
+ value=script_arg_config,
738
+ )
524
739
  bootstrap_actions.append(ba_config)
525
740
 
526
741
  result = cluster_ba_list + bootstrap_actions
@@ -535,15 +750,18 @@ class CreateCluster(Command):
535
750
  args = [constants.DEBUGGING_COMMAND]
536
751
  else:
537
752
  jar = emrutils.get_script_runner(self.region)
538
- args = [emrutils.build_s3_link(
539
- relative_path=constants.DEBUGGING_PATH,
540
- region=self.region)]
753
+ args = [
754
+ emrutils.build_s3_link(
755
+ relative_path=constants.DEBUGGING_PATH, region=self.region
756
+ )
757
+ ]
541
758
 
542
759
  return emrutils.build_step(
543
760
  name=constants.DEBUGGING_NAME,
544
761
  action_on_failure=constants.TERMINATE_CLUSTER,
545
762
  jar=jar,
546
- args=args)
763
+ args=args,
764
+ )
547
765
 
548
766
  def _update_cluster_dict(self, cluster, key, value):
549
767
  if key in cluster:
@@ -553,29 +771,34 @@ class CreateCluster(Command):
553
771
  return cluster
554
772
 
555
773
  def _validate_release_label_ami_version(self, parsed_args):
556
- if parsed_args.ami_version is not None and \
557
- parsed_args.release_label is not None:
774
+ if (
775
+ parsed_args.ami_version is not None
776
+ and parsed_args.release_label is not None
777
+ ):
558
778
  raise exceptions.MutualExclusiveOptionError(
559
- option1="--ami-version",
560
- option2="--release-label")
779
+ option1="--ami-version", option2="--release-label"
780
+ )
561
781
 
562
- if parsed_args.ami_version is None and \
563
- parsed_args.release_label is None:
782
+ if (
783
+ parsed_args.ami_version is None
784
+ and parsed_args.release_label is None
785
+ ):
564
786
  raise exceptions.RequiredOptionsError(
565
- option1="--ami-version",
566
- option2="--release-label")
787
+ option1="--ami-version", option2="--release-label"
788
+ )
567
789
 
568
790
  # Checks if the applications required by steps are specified
569
791
  # using the --applications option.
570
792
  def _validate_required_applications(self, parsed_args):
571
-
572
793
  specified_apps = set([])
573
794
  if parsed_args.applications is not None:
574
- specified_apps = \
575
- set([app['Name'].lower() for app in parsed_args.applications])
795
+ specified_apps = set(
796
+ [app['Name'].lower() for app in parsed_args.applications]
797
+ )
576
798
 
577
- missing_apps = self._get_missing_applications_for_steps(specified_apps,
578
- parsed_args)
799
+ missing_apps = self._get_missing_applications_for_steps(
800
+ specified_apps, parsed_args
801
+ )
579
802
  # Check for HBase.
580
803
  if parsed_args.restore_from_hbase_backup is not None:
581
804
  if constants.HBASE not in specified_apps:
@@ -583,11 +806,13 @@ class CreateCluster(Command):
583
806
 
584
807
  if missing_apps:
585
808
  raise exceptions.MissingApplicationsError(
586
- applications=missing_apps)
809
+ applications=missing_apps
810
+ )
587
811
 
588
812
  def _get_missing_applications_for_steps(self, specified_apps, parsed_args):
589
- allowed_app_steps = set([constants.HIVE, constants.PIG,
590
- constants.IMPALA])
813
+ allowed_app_steps = set(
814
+ [constants.HIVE, constants.PIG, constants.IMPALA]
815
+ )
591
816
  missing_apps = set()
592
817
  if parsed_args.steps is not None:
593
818
  for step in parsed_args.steps:
@@ -597,38 +822,51 @@ class CreateCluster(Command):
597
822
 
598
823
  if step_type is not None:
599
824
  step_type = step_type.lower()
600
- if step_type in allowed_app_steps and \
601
- step_type not in specified_apps:
825
+ if (
826
+ step_type in allowed_app_steps
827
+ and step_type not in specified_apps
828
+ ):
602
829
  missing_apps.add(step['Type'].title())
603
830
  return missing_apps
604
831
 
605
- def _filter_configurations_in_special_cases(self, configurations,
606
- parsed_args, parsed_configs):
832
+ def _filter_configurations_in_special_cases(
833
+ self, configurations, parsed_args, parsed_configs
834
+ ):
607
835
  if parsed_args.use_default_roles:
608
- configurations = [x for x in configurations
609
- if x.name != 'service_role' and
610
- x.name != 'instance_profile']
836
+ configurations = [
837
+ x
838
+ for x in configurations
839
+ if x.name != 'service_role' and x.name != 'instance_profile'
840
+ ]
611
841
  return configurations
612
842
 
613
843
  def _handle_emrfs_parameters(self, cluster, emrfs_args, release_label):
614
844
  if release_label:
615
845
  self.validate_no_emrfs_configuration(cluster)
616
846
  emrfs_configuration = emrfsutils.build_emrfs_confiuration(
617
- emrfs_args)
847
+ emrfs_args
848
+ )
618
849
 
619
850
  self._update_cluster_dict(
620
- cluster=cluster, key='Configurations',
621
- value=[emrfs_configuration])
851
+ cluster=cluster,
852
+ key='Configurations',
853
+ value=[emrfs_configuration],
854
+ )
622
855
  else:
623
856
  emrfs_ba_config_list = emrfsutils.build_bootstrap_action_configs(
624
- self.region, emrfs_args)
857
+ self.region, emrfs_args
858
+ )
625
859
  self._update_cluster_dict(
626
- cluster=cluster, key='BootstrapActions',
627
- value=emrfs_ba_config_list)
860
+ cluster=cluster,
861
+ key='BootstrapActions',
862
+ value=emrfs_ba_config_list,
863
+ )
628
864
 
629
865
  def validate_no_emrfs_configuration(self, cluster):
630
866
  if 'Configurations' in cluster:
631
867
  for config in cluster['Configurations']:
632
- if config is not None and \
633
- config.get('Classification') == constants.EMRFS_SITE:
868
+ if (
869
+ config is not None
870
+ and config.get('Classification') == constants.EMRFS_SITE
871
+ ):
634
872
  raise exceptions.DuplicateEmrFsConfigurationError