awscli 1.42.7__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 (262) 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 +55 -9
  8. awscli/customizations/argrename.py +1 -3
  9. awscli/customizations/cliinputjson.py +4 -0
  10. awscli/customizations/cloudformation/deploy.py +19 -3
  11. awscli/customizations/cloudtrail/validation.py +22 -2
  12. awscli/customizations/commands.py +2 -1
  13. awscli/customizations/eks/update_kubeconfig.py +12 -1
  14. awscli/customizations/emr/argumentschema.py +355 -344
  15. awscli/customizations/emr/createcluster.py +12 -0
  16. awscli/customizations/emr/emrutils.py +83 -50
  17. awscli/customizations/emr/helptext.py +10 -0
  18. awscli/customizations/emr/steputils.py +92 -52
  19. awscli/customizations/gamelift/uploadbuild.py +24 -11
  20. awscli/customizations/globalargs.py +169 -0
  21. awscli/customizations/paginate.py +66 -1
  22. awscli/customizations/s3/filegenerator.py +4 -1
  23. awscli/customizations/s3/fileinfo.py +4 -1
  24. awscli/customizations/s3/fileinfobuilder.py +6 -0
  25. awscli/customizations/s3/s3handler.py +9 -0
  26. awscli/customizations/s3/subcommands.py +147 -6
  27. awscli/customizations/s3/syncstrategy/base.py +9 -0
  28. awscli/customizations/s3/syncstrategy/caseconflict.py +96 -0
  29. awscli/customizations/s3/utils.py +14 -0
  30. awscli/customizations/scalarparse.py +48 -9
  31. awscli/data/cli.json +5 -0
  32. awscli/examples/apigateway/update-vpc-link.rst +47 -0
  33. awscli/examples/application-signals/batch-get-service-level-objective-budget-report.rst +99 -0
  34. awscli/examples/application-signals/create-service-level-objective.rst +88 -0
  35. awscli/examples/application-signals/delete-service-level-objective.rst +10 -0
  36. awscli/examples/application-signals/get-service-level-objective.rst +53 -0
  37. awscli/examples/application-signals/get-service.rst +72 -0
  38. awscli/examples/application-signals/list-service-dependencies.rst +96 -0
  39. awscli/examples/application-signals/list-service-dependents.rst +36 -0
  40. awscli/examples/application-signals/list-service-level-objectives.rst +17 -0
  41. awscli/examples/application-signals/list-service-operations.rst +63 -0
  42. awscli/examples/application-signals/list-services.rst +61 -0
  43. awscli/examples/application-signals/list-tags-for-resource.rst +17 -0
  44. awscli/examples/application-signals/start-discovery.rst +9 -0
  45. awscli/examples/application-signals/tag-resource.rst +11 -0
  46. awscli/examples/application-signals/untag-resource.rst +11 -0
  47. awscli/examples/application-signals/update-service-level-objective.rst +69 -0
  48. awscli/examples/cloudformation/create-generated-template.rst +50 -0
  49. awscli/examples/cloudformation/create-stack-refactor.rst +16 -0
  50. awscli/examples/cloudformation/delete-generated-template.rst +10 -0
  51. awscli/examples/cloudformation/describe-generated-template.rst +62 -0
  52. awscli/examples/cloudformation/describe-resource-scan.rst +38 -0
  53. awscli/examples/cloudformation/describe-stack-refactor.rst +20 -0
  54. awscli/examples/cloudformation/execute-stack-refactor.rst +10 -0
  55. awscli/examples/cloudformation/list-generated-templates.rst +41 -0
  56. awscli/examples/cloudformation/list-resource-scan-related-resources.rst +47 -0
  57. awscli/examples/cloudformation/list-resource-scan-resources.rst +30 -0
  58. awscli/examples/cloudformation/list-stack-refactor-actions.rst +71 -0
  59. awscli/examples/cloudformation/start-resource-scan.rst +14 -0
  60. awscli/examples/ec2/authorize-security-group-ingress.rst +1 -1
  61. awscli/examples/global_options.rst +4 -0
  62. awscli/examples/global_synopsis.rst +1 -0
  63. awscli/examples/guardduty/update-detector.rst +23 -0
  64. awscli/examples/ivs-realtime/get-composition.rst +7 -4
  65. awscli/examples/ivs-realtime/start-composition.rst +88 -3
  66. awscli/examples/lambda/create-function.rst +4 -4
  67. awscli/examples/lambda/get-function.rst +3 -3
  68. awscli/examples/lambda/list-functions.rst +6 -6
  69. awscli/examples/medical-imaging/create-datastore.rst +19 -2
  70. awscli/examples/medical-imaging/get-datastore.rst +24 -1
  71. awscli/examples/networkmanager/get-vpc-attachment.rst +1 -1
  72. awscli/examples/securityhub/describe-hub.rst +6 -4
  73. awscli/examples/servicediscovery/create-service.rst +50 -10
  74. awscli/examples/servicediscovery/delete-namespace.rst +18 -4
  75. awscli/examples/servicediscovery/delete-service-attributes.rst +15 -3
  76. awscli/examples/servicediscovery/delete-service.rst +13 -3
  77. awscli/examples/servicediscovery/deregister-instance.rst +18 -2
  78. awscli/examples/servicediscovery/discover-instances-revision.rst +18 -1
  79. awscli/examples/servicediscovery/discover-instances.rst +32 -2
  80. awscli/examples/servicediscovery/get-instance.rst +30 -4
  81. awscli/examples/servicediscovery/get-instances-health-status.rst +19 -1
  82. awscli/examples/servicediscovery/get-namespace.rst +40 -9
  83. awscli/examples/servicediscovery/get-operation.rst +32 -6
  84. awscli/examples/servicediscovery/get-service-attributes.rst +25 -3
  85. awscli/examples/servicediscovery/get-service.rst +35 -7
  86. awscli/examples/servicediscovery/list-instances.rst +38 -3
  87. awscli/examples/servicediscovery/list-namespaces.rst +45 -22
  88. awscli/examples/servicediscovery/list-services.rst +30 -2
  89. awscli/examples/servicediscovery/register-instance.rst +18 -2
  90. awscli/examples/servicediscovery/update-http-namespace.rst +22 -5
  91. awscli/examples/servicediscovery/update-instance-custom-health-status.rst +14 -1
  92. awscli/examples/servicediscovery/update-private-dns-namespace.rst +22 -5
  93. awscli/examples/servicediscovery/update-public-dns-namespace.rst +22 -5
  94. awscli/examples/servicediscovery/update-service-attributes.rst +14 -2
  95. awscli/examples/servicediscovery/update-service.rst +20 -4
  96. awscli/handlers.py +0 -4
  97. awscli/paramfile.py +21 -4
  98. awscli/testutils.py +17 -0
  99. awscli/topics/config-vars.rst +1 -1
  100. awscli/topics/s3-case-insensitivity.rst +105 -0
  101. awscli/topics/topic-tags.json +16 -0
  102. awscli/utils.py +19 -2
  103. {awscli-1.42.7.dist-info → awscli-1.44.26.dist-info}/METADATA +16 -3
  104. {awscli-1.42.7.dist-info → awscli-1.44.26.dist-info}/RECORD +112 -231
  105. awscli/customizations/opsworks.py +0 -543
  106. awscli/customizations/opsworkscm.py +0 -21
  107. awscli/examples/elastictranscoder/cancel-job.rst +0 -8
  108. awscli/examples/elastictranscoder/create-job.rst +0 -94
  109. awscli/examples/elastictranscoder/create-pipeline.rst +0 -94
  110. awscli/examples/elastictranscoder/create-preset.rst +0 -141
  111. awscli/examples/elastictranscoder/delete-pipeline.rst +0 -13
  112. awscli/examples/elastictranscoder/delete-preset.rst +0 -8
  113. awscli/examples/elastictranscoder/list-jobs-by-pipeline.rst +0 -13
  114. awscli/examples/elastictranscoder/list-jobs-by-status.rst +0 -14
  115. awscli/examples/elastictranscoder/list-pipelines.rst +0 -84
  116. awscli/examples/elastictranscoder/list-presets.rst +0 -95
  117. awscli/examples/elastictranscoder/read-job.rst +0 -65
  118. awscli/examples/elastictranscoder/read-pipeline.rst +0 -59
  119. awscli/examples/elastictranscoder/read-preset.rst +0 -100
  120. awscli/examples/elastictranscoder/update-pipeline-notifications.rst +0 -52
  121. awscli/examples/elastictranscoder/update-pipeline-status.rst +0 -53
  122. awscli/examples/elastictranscoder/update-pipeline.rst +0 -95
  123. awscli/examples/opsworks/assign-instance.rst +0 -14
  124. awscli/examples/opsworks/assign-volume.rst +0 -17
  125. awscli/examples/opsworks/associate-elastic-ip.rst +0 -14
  126. awscli/examples/opsworks/attach-elastic-load-balancer.rst +0 -14
  127. awscli/examples/opsworks/create-app.rst +0 -64
  128. awscli/examples/opsworks/create-deployment.rst +0 -66
  129. awscli/examples/opsworks/create-instance.rst +0 -25
  130. awscli/examples/opsworks/create-layer.rst +0 -17
  131. awscli/examples/opsworks/create-server.rst +0 -43
  132. awscli/examples/opsworks/create-stack.rst +0 -25
  133. awscli/examples/opsworks/create-user-profile.rst +0 -24
  134. awscli/examples/opsworks/delete-app.rst +0 -17
  135. awscli/examples/opsworks/delete-instance.rst +0 -15
  136. awscli/examples/opsworks/delete-layer.rst +0 -17
  137. awscli/examples/opsworks/delete-stack.rst +0 -18
  138. awscli/examples/opsworks/delete-user-profile.rst +0 -17
  139. awscli/examples/opsworks/deregister-elastic-ip.rst +0 -13
  140. awscli/examples/opsworks/deregister-instance.rst +0 -14
  141. awscli/examples/opsworks/deregister-rds-db-instance.rst +0 -20
  142. awscli/examples/opsworks/deregister-volume.rst +0 -15
  143. awscli/examples/opsworks/describe-apps.rst +0 -38
  144. awscli/examples/opsworks/describe-commands.rst +0 -43
  145. awscli/examples/opsworks/describe-deployments.rst +0 -52
  146. awscli/examples/opsworks/describe-elastic-ips.rst +0 -24
  147. awscli/examples/opsworks/describe-elastic-load-balancers.rst +0 -37
  148. awscli/examples/opsworks/describe-instances.rst +0 -95
  149. awscli/examples/opsworks/describe-layers.rst +0 -171
  150. awscli/examples/opsworks/describe-load-based-auto-scaling.rst +0 -37
  151. awscli/examples/opsworks/describe-my-user-profile.rst +0 -24
  152. awscli/examples/opsworks/describe-permissions.rst +0 -26
  153. awscli/examples/opsworks/describe-raid-arrays.rst +0 -31
  154. awscli/examples/opsworks/describe-rds-db-instances.rst +0 -29
  155. awscli/examples/opsworks/describe-stack-provisioning-parameters.rst +0 -32
  156. awscli/examples/opsworks/describe-stack-summary.rst +0 -27
  157. awscli/examples/opsworks/describe-stacks.rst +0 -65
  158. awscli/examples/opsworks/describe-timebased-auto-scaling.rst +0 -39
  159. awscli/examples/opsworks/describe-user-profiles.rst +0 -32
  160. awscli/examples/opsworks/describe-volumes.rst +0 -31
  161. awscli/examples/opsworks/detach-elastic-load-balancer.rst +0 -14
  162. awscli/examples/opsworks/disassociate-elastic-ip.rst +0 -14
  163. awscli/examples/opsworks/get-hostname-suggestion.rst +0 -21
  164. awscli/examples/opsworks/reboot-instance.rst +0 -14
  165. awscli/examples/opsworks/register-elastic-ip.rst +0 -19
  166. awscli/examples/opsworks/register-rds-db-instance.rst +0 -15
  167. awscli/examples/opsworks/register-volume.rst +0 -18
  168. awscli/examples/opsworks/register.rst +0 -105
  169. awscli/examples/opsworks/set-load-based-auto-scaling.rst +0 -38
  170. awscli/examples/opsworks/set-permission.rst +0 -23
  171. awscli/examples/opsworks/set-time-based-auto-scaling.rst +0 -33
  172. awscli/examples/opsworks/start-instance.rst +0 -20
  173. awscli/examples/opsworks/start-stack.rst +0 -15
  174. awscli/examples/opsworks/stop-instance.rst +0 -20
  175. awscli/examples/opsworks/stop-stack.rst +0 -15
  176. awscli/examples/opsworks/unassign-instance.rst +0 -14
  177. awscli/examples/opsworks/unassign-volume.rst +0 -16
  178. awscli/examples/opsworks/update-app.rst +0 -14
  179. awscli/examples/opsworks/update-elastic-ip.rst +0 -14
  180. awscli/examples/opsworks/update-instance.rst +0 -14
  181. awscli/examples/opsworks/update-layer.rst +0 -14
  182. awscli/examples/opsworks/update-my-user-profile.rst +0 -16
  183. awscli/examples/opsworks/update-rds-db-instance.rst +0 -18
  184. awscli/examples/opsworks/update-volume.rst +0 -16
  185. awscli/examples/opsworkscm/associate-node.rst +0 -22
  186. awscli/examples/opsworkscm/create-backup.rst +0 -46
  187. awscli/examples/opsworkscm/create-server.rst +0 -48
  188. awscli/examples/opsworkscm/delete-backup.rst +0 -17
  189. awscli/examples/opsworkscm/delete-server.rst +0 -16
  190. awscli/examples/opsworkscm/describe-account-attributes.rst +0 -26
  191. awscli/examples/opsworkscm/describe-backups.rst +0 -44
  192. awscli/examples/opsworkscm/describe-events.rst +0 -21
  193. awscli/examples/opsworkscm/describe-node-association-status.rst +0 -20
  194. awscli/examples/opsworkscm/describe-servers.rst +0 -48
  195. awscli/examples/opsworkscm/disassociate-node.rst +0 -19
  196. awscli/examples/opsworkscm/restore-server.rst +0 -20
  197. awscli/examples/opsworkscm/start-maintenance.rst +0 -39
  198. awscli/examples/opsworkscm/update-server-engine-attributes.rst +0 -43
  199. awscli/examples/opsworkscm/update-server.rst +0 -42
  200. awscli/examples/qldb/cancel-journal-kinesis-stream.rst +0 -15
  201. awscli/examples/qldb/create-ledger.rst +0 -43
  202. awscli/examples/qldb/delete-ledger.rst +0 -10
  203. awscli/examples/qldb/describe-journal-kinesis-stream.rst +0 -29
  204. awscli/examples/qldb/describe-journal-s3-export.rst +0 -30
  205. awscli/examples/qldb/describe-ledger.rst +0 -23
  206. awscli/examples/qldb/export-journal-to-s3.rst +0 -28
  207. awscli/examples/qldb/get-block.rst +0 -55
  208. awscli/examples/qldb/get-digest.rst +0 -17
  209. awscli/examples/qldb/get-revision.rst +0 -57
  210. awscli/examples/qldb/list-journal-kinesis-streams-for-ledger.rst +0 -30
  211. awscli/examples/qldb/list-journal-s3-exports-for-ledger.rst +0 -31
  212. awscli/examples/qldb/list-journal-s3-exports.rst +0 -46
  213. awscli/examples/qldb/list-ledgers.rst +0 -24
  214. awscli/examples/qldb/list-tags-for-resource.rst +0 -17
  215. awscli/examples/qldb/stream-journal-to-kinesis.rst +0 -46
  216. awscli/examples/qldb/tag-resource.rst +0 -11
  217. awscli/examples/qldb/untag-resource.rst +0 -11
  218. awscli/examples/qldb/update-ledger-permissions-mode.rst +0 -34
  219. awscli/examples/qldb/update-ledger.rst +0 -63
  220. awscli/examples/robomaker/batch-describe-simulation-job.rst +0 -150
  221. awscli/examples/robomaker/cancel-simulation-job.rst +0 -6
  222. awscli/examples/robomaker/create-deployment-job.rst +0 -37
  223. awscli/examples/robomaker/create-fleet.rst +0 -18
  224. awscli/examples/robomaker/create-robot-application-version.rst +0 -31
  225. awscli/examples/robomaker/create-robot-application.rst +0 -29
  226. awscli/examples/robomaker/create-robot.rst +0 -20
  227. awscli/examples/robomaker/create-simulation-application-version.rst +0 -39
  228. awscli/examples/robomaker/create-simulation-application.rst +0 -38
  229. awscli/examples/robomaker/create-simulation-job.rst +0 -43
  230. awscli/examples/robomaker/delete-fleet.rst +0 -7
  231. awscli/examples/robomaker/delete-robot-application.rst +0 -7
  232. awscli/examples/robomaker/delete-robot.rst +0 -7
  233. awscli/examples/robomaker/delete-simulation-application.rst +0 -7
  234. awscli/examples/robomaker/deregister-robot.rst +0 -14
  235. awscli/examples/robomaker/describe-deployment-job.rst +0 -38
  236. awscli/examples/robomaker/describe-fleet.rst +0 -28
  237. awscli/examples/robomaker/describe-robot-application.rst +0 -29
  238. awscli/examples/robomaker/describe-robot.rst +0 -21
  239. awscli/examples/robomaker/describe-simulation-application.rst +0 -37
  240. awscli/examples/robomaker/describe-simulation-job.rst +0 -45
  241. awscli/examples/robomaker/list-deployment-jobs.rst +0 -57
  242. awscli/examples/robomaker/list-fleets.rst +0 -22
  243. awscli/examples/robomaker/list-robot-applications.rst +0 -32
  244. awscli/examples/robomaker/list-robots.rst +0 -45
  245. awscli/examples/robomaker/list-simulation-applications.rst +0 -50
  246. awscli/examples/robomaker/list-simulation-jobs.rst +0 -80
  247. awscli/examples/robomaker/list-tags-for-resource.rst +0 -16
  248. awscli/examples/robomaker/register-robot.rst +0 -14
  249. awscli/examples/robomaker/restart-simulation-job.rst +0 -7
  250. awscli/examples/robomaker/sync-deployment-job.rst +0 -30
  251. awscli/examples/robomaker/tag-resource.rst +0 -7
  252. awscli/examples/robomaker/untag-resource.rst +0 -7
  253. awscli/examples/robomaker/update-robot-application.rst +0 -28
  254. awscli/examples/robomaker/update-simulation-application.rst +0 -36
  255. {awscli-1.42.7.data → awscli-1.44.26.data}/scripts/aws +0 -0
  256. {awscli-1.42.7.data → awscli-1.44.26.data}/scripts/aws.cmd +0 -0
  257. {awscli-1.42.7.data → awscli-1.44.26.data}/scripts/aws_bash_completer +0 -0
  258. {awscli-1.42.7.data → awscli-1.44.26.data}/scripts/aws_completer +0 -0
  259. {awscli-1.42.7.data → awscli-1.44.26.data}/scripts/aws_zsh_completer.sh +0 -0
  260. {awscli-1.42.7.dist-info → awscli-1.44.26.dist-info}/LICENSE.txt +0 -0
  261. {awscli-1.42.7.dist-info → awscli-1.44.26.dist-info}/WHEEL +0 -0
  262. {awscli-1.42.7.dist-info → awscli-1.44.26.dist-info}/top_level.txt +0 -0
awscli/__init__.py CHANGED
@@ -18,7 +18,7 @@ A Universal Command Line Environment for Amazon Web Services.
18
18
 
19
19
  import os
20
20
 
21
- __version__ = '1.42.7'
21
+ __version__ = '1.44.26'
22
22
 
23
23
  #
24
24
  # Get our data path to be added to botocore's search path
awscli/alias.py CHANGED
@@ -183,7 +183,7 @@ class ServiceAliasCommand(BaseAliasCommand):
183
183
  parsed_alias_args, remaining = self._parser.parse_known_args(
184
184
  alias_args
185
185
  )
186
- self._update_parsed_globals(parsed_alias_args, parsed_globals)
186
+ self._update_parsed_globals(parsed_alias_args, parsed_globals, remaining)
187
187
  # Take any of the remaining arguments that were not parsed out and
188
188
  # prepend them to the remaining args provided to the alias.
189
189
  remaining.extend(args)
@@ -228,7 +228,7 @@ class ServiceAliasCommand(BaseAliasCommand):
228
228
  )
229
229
  return alias_args
230
230
 
231
- def _update_parsed_globals(self, parsed_alias_args, parsed_globals):
231
+ def _update_parsed_globals(self, parsed_alias_args, parsed_globals, remaining):
232
232
  global_params_to_update = self._get_global_parameters_to_update(
233
233
  parsed_alias_args
234
234
  )
@@ -237,7 +237,7 @@ class ServiceAliasCommand(BaseAliasCommand):
237
237
  # global parameters provided in the alias before updating
238
238
  # the original provided global parameter values
239
239
  # and passing those onto subsequent commands.
240
- emit_top_level_args_parsed_event(self._session, parsed_alias_args)
240
+ emit_top_level_args_parsed_event(self._session, parsed_alias_args, remaining)
241
241
  for param_name in global_params_to_update:
242
242
  updated_param_value = getattr(parsed_alias_args, param_name)
243
243
  setattr(parsed_globals, param_name, updated_param_value)
awscli/argprocess.py CHANGED
@@ -65,7 +65,7 @@ class TooComplexError(Exception):
65
65
 
66
66
 
67
67
  def unpack_argument(
68
- session, service_name, operation_name, cli_argument, value
68
+ session, service_name, operation_name, cli_argument, value, parsed_globals
69
69
  ):
70
70
  """
71
71
  Unpack an argument's value from the commandline. This is part one of a two
@@ -83,6 +83,7 @@ def unpack_argument(
83
83
  value=value,
84
84
  service_name=service_name,
85
85
  operation_name=operation_name,
86
+ parsed_globals=parsed_globals,
86
87
  )
87
88
 
88
89
  if value_override is not None:
@@ -535,7 +536,11 @@ class ParamShorthandDocGen(ParamShorthand):
535
536
 
536
537
  def _map_docs(self, argument_model, stack):
537
538
  k = argument_model.key
538
- value_docs = self._shorthand_docs(argument_model.value, stack)
539
+ stack.append(argument_model.value.name)
540
+ try:
541
+ value_docs = self._shorthand_docs(argument_model.value, stack)
542
+ finally:
543
+ stack.pop()
539
544
  start = 'KeyName1=%s,KeyName2=%s' % (value_docs, value_docs)
540
545
  if k.enum and not stack:
541
546
  start += '\n\nWhere valid key names are:\n'
awscli/arguments.py CHANGED
@@ -449,7 +449,7 @@ class CLIArgument(BaseCLIArgument):
449
449
  cli_name = self.cli_name
450
450
  parser.add_argument(
451
451
  cli_name,
452
- help=self.documentation,
452
+ help=self.documentation.replace('%', '%%'),
453
453
  type=self.cli_type,
454
454
  required=self.required,
455
455
  )
awscli/bcdoc/docevents.py CHANGED
@@ -13,6 +13,7 @@
13
13
 
14
14
 
15
15
  DOC_EVENTS = {
16
+ 'doc-meta-description': '.%s',
16
17
  'doc-breadcrumbs': '.%s',
17
18
  'doc-title': '.%s',
18
19
  'doc-description': '.%s',
@@ -39,6 +40,8 @@ def generate_events(session, help_command):
39
40
  # Now generate the documentation events
40
41
  session.emit('doc-breadcrumbs.%s' % help_command.event_class,
41
42
  help_command=help_command)
43
+ session.emit('doc-meta-description.%s' % help_command.event_class,
44
+ help_command=help_command)
42
45
  session.emit('doc-title.%s' % help_command.event_class,
43
46
  help_command=help_command)
44
47
  session.emit('doc-description.%s' % help_command.event_class,
awscli/clidocs.py CHANGED
@@ -17,7 +17,7 @@ import re
17
17
  from botocore.model import StringShape
18
18
  from botocore.utils import is_json_value_header
19
19
 
20
- from awscli import SCALAR_TYPES
20
+ from awscli import SCALAR_TYPES, __version__ as AWS_CLI_VERSION
21
21
  from awscli.argprocess import ParamShorthandDocGen
22
22
  from awscli.bcdoc.docevents import DOC_EVENTS
23
23
  from awscli.topictags import TopicTagDB
@@ -114,7 +114,8 @@ class CLIDocumentEventHandler:
114
114
  full_cmd_list.append(cmd)
115
115
  full_cmd_name = ' '.join(full_cmd_list)
116
116
  doc.write(f':ref:`{cmd} <cli:{full_cmd_name}>`')
117
- doc.write(' ]')
117
+ doc.writeln(' ]')
118
+ doc.writeln('')
118
119
 
119
120
  def doc_title(self, help_command, **kwargs):
120
121
  doc = help_command.doc
@@ -223,6 +224,9 @@ class CLIDocumentEventHandler:
223
224
  )
224
225
  doc.write('\n')
225
226
 
227
+ def doc_meta_description(self, help_command, **kwargs):
228
+ pass
229
+
226
230
  def _document_enums(self, model, doc):
227
231
  """Documents top-level parameter enums"""
228
232
  if isinstance(model, StringShape):
@@ -402,6 +406,13 @@ class ServiceDocumentEventHandler(CLIDocumentEventHandler):
402
406
  else:
403
407
  doc.style.tocitem(command_name)
404
408
 
409
+ def doc_meta_description(self, help_command, **kwargs):
410
+ doc = help_command.doc
411
+ reference = help_command.event_class.replace('.', ' ')
412
+ doc.writeln(".. meta::")
413
+ doc.writeln(f" :description: Learn about the AWS CLI {AWS_CLI_VERSION} {reference} commands.")
414
+ doc.writeln("")
415
+
405
416
 
406
417
  class OperationDocumentEventHandler(CLIDocumentEventHandler):
407
418
  AWS_DOC_BASE = 'https://docs.aws.amazon.com/goto/WebAPI'
@@ -618,6 +629,12 @@ class OperationDocumentEventHandler(CLIDocumentEventHandler):
618
629
  for member_name, member_shape in output_shape.members.items():
619
630
  self._doc_member(doc, member_name, member_shape, stack=[])
620
631
 
632
+ def doc_meta_description(self, help_command, **kwargs):
633
+ doc = help_command.doc
634
+ reference = help_command.event_class.replace('.', ' ')
635
+ doc.writeln(".. meta::")
636
+ doc.writeln(f" :description: Use the AWS CLI {AWS_CLI_VERSION} to run the {reference} command.")
637
+ doc.writeln("")
621
638
 
622
639
  class TopicListerDocumentEventHandler(CLIDocumentEventHandler):
623
640
  DESCRIPTION = (
awscli/clidriver.py CHANGED
@@ -48,7 +48,7 @@ from awscli.help import (
48
48
  ServiceHelpCommand,
49
49
  )
50
50
  from awscli.plugin import load_plugins
51
- from awscli.utils import emit_top_level_args_parsed_event, write_exception, create_nested_client
51
+ from awscli.utils import emit_top_level_args_parsed_event, write_exception, create_nested_client, resolve_v2_debug_mode
52
52
  from botocore import __version__ as botocore_version
53
53
  from botocore import xform_name
54
54
 
@@ -225,7 +225,7 @@ class CLIDriver:
225
225
  # that exceptions can be raised, which should have the same
226
226
  # general exception handling logic as calling into the
227
227
  # command table. This is why it's in the try/except clause.
228
- self._handle_top_level_args(parsed_args)
228
+ self._handle_top_level_args(parsed_args, remaining)
229
229
  self._emit_session_event(parsed_args)
230
230
  HISTORY_RECORDER.record(
231
231
  'CLI_VERSION', self.session.user_agent(), 'CLI'
@@ -279,8 +279,8 @@ class CLIDriver:
279
279
  sys.stderr.write(msg)
280
280
  sys.stderr.write('\n')
281
281
 
282
- def _handle_top_level_args(self, args):
283
- emit_top_level_args_parsed_event(self.session, args)
282
+ def _handle_top_level_args(self, args, remaining):
283
+ emit_top_level_args_parsed_event(self.session, args, remaining)
284
284
  if args.profile:
285
285
  self.session.set_config_variable('profile', args.profile)
286
286
  if args.region:
@@ -542,9 +542,15 @@ class ServiceOperation:
542
542
  event, parsed_args=parsed_args, parsed_globals=parsed_globals
543
543
  )
544
544
  call_parameters = self._build_call_parameters(
545
- parsed_args, self.arg_table
545
+ parsed_args, self.arg_table, parsed_globals
546
546
  )
547
547
 
548
+ self._detect_binary_file_migration_change(
549
+ self._session,
550
+ parsed_args,
551
+ parsed_globals,
552
+ self.arg_table
553
+ )
548
554
  event = f'calling-command.{self._parent_name}.{self._name}'
549
555
  override = self._emit_first_non_none_response(
550
556
  event,
@@ -590,7 +596,7 @@ class ServiceOperation:
590
596
  # CLIArguments for values.
591
597
  parser.add_argument('help', nargs='?')
592
598
 
593
- def _build_call_parameters(self, args, arg_table):
599
+ def _build_call_parameters(self, args, arg_table, parsed_globals):
594
600
  # We need to convert the args specified on the command
595
601
  # line as valid **kwargs we can hand to botocore.
596
602
  service_params = {}
@@ -601,11 +607,11 @@ class ServiceOperation:
601
607
  py_name = arg_object.py_name
602
608
  if py_name in parsed_args:
603
609
  value = parsed_args[py_name]
604
- value = self._unpack_arg(arg_object, value)
610
+ value = self._unpack_arg(arg_object, value, parsed_globals)
605
611
  arg_object.add_to_params(service_params, value)
606
612
  return service_params
607
613
 
608
- def _unpack_arg(self, cli_argument, value):
614
+ def _unpack_arg(self, cli_argument, value, parsed_globals):
609
615
  # Unpacks a commandline argument into a Python value by firing the
610
616
  # load-cli-arg.service-name.operation-name event.
611
617
  session = self._session
@@ -613,7 +619,7 @@ class ServiceOperation:
613
619
  operation_name = xform_name(self._name, '-')
614
620
 
615
621
  return unpack_argument(
616
- session, service_name, operation_name, cli_argument, value
622
+ session, service_name, operation_name, cli_argument, value, parsed_globals
617
623
  )
618
624
 
619
625
  def _create_argument_table(self):
@@ -661,6 +667,46 @@ class ServiceOperation:
661
667
  parser = ArgTableArgParser(arg_table)
662
668
  return parser
663
669
 
670
+ def _detect_binary_file_migration_change(
671
+ self,
672
+ session,
673
+ parsed_args,
674
+ parsed_globals,
675
+ arg_table
676
+ ):
677
+ if (
678
+ session.get_scoped_config()
679
+ .get('cli_binary_format', None) == 'raw-in-base64-out'
680
+ ):
681
+ # if cli_binary_format is set to raw-in-base64-out, then v2 behavior will
682
+ # be the same as v1, so there is no breaking change in this case.
683
+ return
684
+ if resolve_v2_debug_mode(parsed_globals):
685
+ parsed_args_to_check = {
686
+ arg: getattr(parsed_args, arg)
687
+ for arg in vars(parsed_args) if getattr(parsed_args, arg)
688
+ }
689
+
690
+ arg_values_to_check = [
691
+ arg.py_name for arg in arg_table.values()
692
+ if arg.py_name in parsed_args_to_check
693
+ and arg.argument_model.type_name == 'blob'
694
+ ]
695
+ if arg_values_to_check:
696
+ print(
697
+ '\nAWS CLI v2 UPGRADE WARNING: When specifying a '
698
+ 'blob-type parameter, AWS CLI v2 will assume the '
699
+ 'parameter value is base64-encoded. This is different '
700
+ 'from v1 behavior, where the AWS CLI will automatically '
701
+ 'encode the value to base64. To retain v1 behavior in '
702
+ 'AWS CLI v2, set the `cli_binary_format` configuration '
703
+ 'variable to `raw-in-base64-out`. See '
704
+ 'https://docs.aws.amazon.com/cli/latest/userguide/'
705
+ 'cliv2-migration-changes.html'
706
+ '#cliv2-migration-binaryparam.\n',
707
+ file=sys.stderr
708
+ )
709
+
664
710
 
665
711
  class CLIOperationCaller:
666
712
  """Call an AWS operation and format the response."""
@@ -26,8 +26,6 @@ ARGUMENT_RENAMES = {
26
26
  'ec2.create-image.no-no-reboot': 'reboot',
27
27
  'ec2.*.no-egress': 'ingress',
28
28
  'ec2.*.no-disable-api-termination': 'enable-api-termination',
29
- 'opsworks.*.region': 'stack-region',
30
- 'elastictranscoder.*.output': 'job-output',
31
29
  'swf.register-activity-type.version': 'activity-version',
32
30
  'swf.register-workflow-type.version': 'workflow-version',
33
31
  'datapipeline.*.query': 'objects-query',
@@ -96,6 +94,7 @@ ARGUMENT_RENAMES = {
96
94
  'eks.update-cluster-version.version': 'kubernetes-version',
97
95
  'eks.create-nodegroup.version': 'kubernetes-version',
98
96
  'eks.update-nodegroup-version.version': 'kubernetes-version',
97
+ 'eks.update-cluster-components-version.version': 'kubernetes-version',
99
98
  'schemas.*.version': 'schema-version',
100
99
  'sagemaker.delete-image-version.version': 'version-number',
101
100
  'sagemaker.describe-image-version.version': 'version-number',
@@ -140,7 +139,6 @@ HIDDEN_ALIASES = {
140
139
  'importexport.get-shipping-label.street3': 'street-3',
141
140
  'lambda.publish-version.code-sha256': 'code-sha-256',
142
141
  'lightsail.import-key-pair.public-key-base64': 'public-key-base-64',
143
- 'opsworks.register-volume.ec2-volume-id': 'ec-2-volume-id',
144
142
  'mgn.*.replication-servers-security-groups-ids':
145
143
  'replication-servers-security-groups-i-ds',
146
144
  'mgn.*.source-server-ids': 'source-server-i-ds',
@@ -70,6 +70,10 @@ class CliInputJSONArgument(OverrideRequiredArgsArgument):
70
70
  try:
71
71
  # Try to load the JSON string into a python dictionary
72
72
  input_data = json.loads(retrieved_json)
73
+ self._session.register(
74
+ f"get-cli-input-json-data",
75
+ lambda **inner_kwargs: input_data
76
+ )
73
77
  except ValueError as e:
74
78
  raise ParamError(
75
79
  self.name, "Invalid JSON: %s\nJSON received: %s"
@@ -24,7 +24,8 @@ from awscli.customizations.cloudformation.yamlhelper import yaml_parse
24
24
 
25
25
  from awscli.customizations.commands import BasicCommand
26
26
  from awscli.compat import get_stdout_text_writer
27
- from awscli.utils import create_nested_client, write_exception
27
+ from awscli.customizations.utils import uni_print
28
+ from awscli.utils import create_nested_client, write_exception, resolve_v2_debug_mode
28
29
 
29
30
  LOG = logging.getLogger(__name__)
30
31
 
@@ -316,18 +317,33 @@ class DeployCommand(BasicCommand):
316
317
  s3_uploader = None
317
318
 
318
319
  deployer = Deployer(cloudformation_client)
320
+ v2_debug = resolve_v2_debug_mode(parsed_globals)
319
321
  return self.deploy(deployer, stack_name, template_str,
320
322
  parameters, parsed_args.capabilities,
321
323
  parsed_args.execute_changeset, parsed_args.role_arn,
322
324
  parsed_args.notification_arns, s3_uploader,
323
325
  tags, parsed_args.fail_on_empty_changeset,
324
- parsed_args.disable_rollback)
326
+ parsed_args.disable_rollback, v2_debug)
325
327
 
326
328
  def deploy(self, deployer, stack_name, template_str,
327
329
  parameters, capabilities, execute_changeset, role_arn,
328
330
  notification_arns, s3_uploader, tags,
329
- fail_on_empty_changeset=True, disable_rollback=False):
331
+ fail_on_empty_changeset=True, disable_rollback=False,
332
+ v2_debug=False):
330
333
  try:
334
+ if v2_debug and fail_on_empty_changeset:
335
+ uni_print(
336
+ '\nAWS CLI v2 UPGRADE WARNING: In AWS CLI v2, deploying '
337
+ 'an AWS CloudFormation Template that results in an empty '
338
+ 'changeset will NOT result in an error by default. This '
339
+ 'is different from v1 behavior, where empty changesets '
340
+ 'result in an error by default. To migrate to v2 behavior '
341
+ 'and resolve this warning, you can add the '
342
+ '`--no-fail-on-empty-changeset` flag to the command. '
343
+ 'See https://docs.aws.amazon.com/cli/latest/userguide/'
344
+ 'cliv2-migration-changes.html#cliv2-migration-cfn.\n',
345
+ out_file=sys.stderr
346
+ )
331
347
  result = deployer.create_and_wait_for_changeset(
332
348
  stack_name=stack_name,
333
349
  cfn_template=template_str,
@@ -282,9 +282,10 @@ class DigestProvider(object):
282
282
  """
283
283
  digests = []
284
284
  marker = self._create_digest_key(start_date, prefix)
285
+ s3_digest_files_prefix = self._create_digest_prefix(start_date, prefix)
285
286
  client = self._client_provider.get_client(bucket)
286
287
  paginator = client.get_paginator('list_objects')
287
- page_iterator = paginator.paginate(Bucket=bucket, Marker=marker)
288
+ page_iterator = paginator.paginate(Bucket=bucket, Marker=marker, Prefix=s3_digest_files_prefix)
288
289
  key_filter = page_iterator.search('Contents[*].Key')
289
290
  # Create a target start end end date
290
291
  target_start_date = format_date(normalize_date(start_date))
@@ -294,7 +295,7 @@ class DigestProvider(object):
294
295
  # Ensure digests are from the same trail.
295
296
  digest_key_regex = re.compile(self._create_digest_key_regex(prefix))
296
297
  for key in key_filter:
297
- if digest_key_regex.match(key):
298
+ if key and digest_key_regex.match(key):
298
299
  # Use a lexicographic comparison to know when to stop.
299
300
  extracted_date = extract_digest_key_date(key)
300
301
  if extracted_date > target_end_date:
@@ -361,6 +362,25 @@ class DigestProvider(object):
361
362
  key = key_prefix + '/' + key
362
363
  return key
363
364
 
365
+ def _create_digest_prefix(self, start_date, key_prefix):
366
+ """Creates an S3 prefix to scope listing to trail's region.
367
+
368
+ :return: Returns a prefix string to limit S3 listing scope.
369
+ """
370
+ template = 'AWSLogs/'
371
+ template_params = {
372
+ 'account_id': self.account_id,
373
+ 'source_region': self.trail_source_region
374
+ }
375
+ if self.organization_id:
376
+ template += '{organization_id}/'
377
+ template_params['organization_id'] = self.organization_id
378
+ template += '{account_id}/CloudTrail-Digest/{source_region}'
379
+ prefix = template.format(**template_params)
380
+ if key_prefix:
381
+ prefix = key_prefix + '/' + prefix
382
+ return prefix
383
+
364
384
  def _create_digest_key_regex(self, key_prefix):
365
385
  """Creates a regular expression used to match against S3 keys"""
366
386
  template = 'AWSLogs/'
@@ -154,7 +154,8 @@ class BasicCommand(CLICommand):
154
154
  'custom',
155
155
  self.name,
156
156
  cli_argument,
157
- value
157
+ value,
158
+ parsed_globals
158
159
  )
159
160
 
160
161
  # If this parameter has a schema defined, then allow plugins
@@ -77,6 +77,12 @@ class UpdateKubeconfigCommand(BasicCommand):
77
77
  "connect to the cluster the first time."),
78
78
  'required': False
79
79
  },
80
+ {
81
+ 'name': 'proxy-url',
82
+ 'help_text': ("Optionally specify a proxy url to route "
83
+ "traffic via when connecting to a cluster."),
84
+ 'required': False
85
+ },
80
86
  {
81
87
  'name': 'dry-run',
82
88
  'action': 'store_true',
@@ -305,7 +311,7 @@ class EKSClient(object):
305
311
  endpoint = self.cluster_description.get("endpoint")
306
312
  arn = self.cluster_description.get("arn")
307
313
 
308
- return OrderedDict([
314
+ generated_cluster = OrderedDict([
309
315
  ("cluster", OrderedDict([
310
316
  ("certificate-authority-data", cert_data),
311
317
  ("server", endpoint)
@@ -313,6 +319,11 @@ class EKSClient(object):
313
319
  ("name", arn)
314
320
  ])
315
321
 
322
+ if self._parsed_args.proxy_url is not None:
323
+ generated_cluster["cluster"]["proxy-url"] = self._parsed_args.proxy_url
324
+
325
+ return generated_cluster
326
+
316
327
  def get_user_entry(self, user_alias=None):
317
328
  """
318
329
  Return a user entry generated using