awscli 1.39.0__py3-none-any.whl → 1.40.1__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.
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.39.0'
21
+ __version__ = '1.40.1'
22
22
 
23
23
  #
24
24
  # Get our data path to be added to botocore's search path
@@ -103,6 +103,14 @@ class UpdateKubeconfigCommand(BasicCommand):
103
103
  'help_text': ("Alias for the generated user name. "
104
104
  "Defaults to match cluster ARN."),
105
105
  'required': False
106
+ },
107
+ {
108
+ 'name': 'assume-role-arn',
109
+ 'help_text': ('To assume a role for retrieving cluster information, '
110
+ 'specify an IAM role ARN with this option. '
111
+ 'Use this for cross-account access to get cluster details '
112
+ 'from the account where the cluster resides.'),
113
+ 'required': False
106
114
  }
107
115
  ]
108
116
 
@@ -249,27 +257,42 @@ class EKSClient(object):
249
257
  Cache the response in self._cluster_description.
250
258
  describe-cluster will only be called once.
251
259
  """
252
- if self._cluster_description is None:
253
- if self._parsed_globals is None:
254
- client = self._session.create_client("eks")
255
- else:
256
- client = self._session.create_client(
257
- "eks",
258
- region_name=self._parsed_globals.region,
259
- endpoint_url=self._parsed_globals.endpoint_url,
260
- verify=self._parsed_globals.verify_ssl
261
- )
262
- full_description = client.describe_cluster(name=self._cluster_name)
263
- self._cluster_description = full_description["cluster"]
264
-
265
- if "status" not in self._cluster_description:
266
- raise EKSClusterError("Cluster not found")
267
- if self._cluster_description["status"] not in ["ACTIVE", "UPDATING"]:
268
- raise EKSClusterError("Cluster status is {0}".format(
269
- self._cluster_description["status"]
270
- ))
271
-
272
- return self._cluster_description
260
+ if self._cluster_description is not None:
261
+ return self._cluster_description
262
+
263
+ client_kwargs = {}
264
+ if self._parsed_globals:
265
+ client_kwargs.update({
266
+ "region_name": self._parsed_globals.region,
267
+ "endpoint_url": self._parsed_globals.endpoint_url,
268
+ "verify": self._parsed_globals.verify_ssl,
269
+ })
270
+
271
+ # Handle role assumption if needed
272
+ if getattr(self._parsed_args, 'assume_role_arn', None):
273
+ sts_client = self._session.create_client('sts')
274
+ credentials = sts_client.assume_role(
275
+ RoleArn=self._parsed_args.assume_role_arn,
276
+ RoleSessionName='EKSDescribeClusterSession'
277
+ )["Credentials"]
278
+
279
+ client_kwargs.update({
280
+ "aws_access_key_id": credentials["AccessKeyId"],
281
+ "aws_secret_access_key": credentials["SecretAccessKey"],
282
+ "aws_session_token": credentials["SessionToken"],
283
+ })
284
+
285
+ client = self._session.create_client("eks", **client_kwargs)
286
+ full_description = client.describe_cluster(name=self._cluster_name)
287
+ cluster = full_description.get("cluster")
288
+
289
+ if not cluster or "status" not in cluster:
290
+ raise EKSClusterError("Cluster not found")
291
+ if cluster["status"] not in ["ACTIVE", "UPDATING"]:
292
+ raise EKSClusterError(f"Cluster status is {cluster['status']}")
293
+
294
+ self._cluster_description = cluster
295
+ return cluster
273
296
 
274
297
  def get_cluster_entry(self):
275
298
  """
@@ -0,0 +1,28 @@
1
+ # Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
4
+ # may not use this file except in compliance with the License. A copy of
5
+ # the License is located at
6
+ #
7
+ # http://aws.amazon.com/apache2.0/
8
+ #
9
+ # or in the "license" file accompanying this file. This file is
10
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ # ANY KIND, either express or implied. See the License for the specific
12
+ # language governing permissions and limitations under the License.
13
+ from awscli.customizations.utils import make_hidden_command_alias
14
+
15
+
16
+ def register_alias_socialmessaging_command(event_emitter):
17
+ event_emitter.register(
18
+ 'building-command-table.socialmessaging',
19
+ alias_socialmessaging_command
20
+ )
21
+
22
+
23
+ def alias_socialmessaging_command(command_table, **kwargs):
24
+ make_hidden_command_alias(
25
+ command_table,
26
+ existing_name='delete-whatsapp-message-media',
27
+ alias_name='delete-whatsapp-media-message',
28
+ )
awscli/handlers.py CHANGED
@@ -116,6 +116,7 @@ from awscli.customizations.servicecatalog import (
116
116
  from awscli.customizations.sessendemail import register_ses_send_email
117
117
  from awscli.customizations.sessionmanager import register_ssm_session
118
118
  from awscli.customizations.sms_voice import register_sms_voice_hide
119
+ from awscli.customizations.socialmessaging import register_alias_socialmessaging_command
119
120
  from awscli.customizations.streamingoutputarg import add_streaming_output_arg
120
121
  from awscli.customizations.toplevelbool import register_bool_params
121
122
  from awscli.customizations.translate import (
@@ -210,6 +211,7 @@ def awscli_initialize(event_handlers):
210
211
  register_alias_opsworks_cm(event_handlers)
211
212
  register_alias_mturk_command(event_handlers)
212
213
  register_alias_sagemaker_runtime_command(event_handlers)
214
+ register_alias_socialmessaging_command(event_handlers)
213
215
  register_servicecatalog_commands(event_handlers)
214
216
  register_translate_import_terminology(event_handlers)
215
217
  register_history_mode(event_handlers)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: awscli
3
- Version: 1.39.0
3
+ Version: 1.40.1
4
4
  Summary: Universal Command Line Environment for AWS.
5
5
  Home-page: http://aws.amazon.com/cli/
6
6
  Author: Amazon Web Services
@@ -22,7 +22,7 @@ Classifier: Programming Language :: Python :: 3.11
22
22
  Classifier: Programming Language :: Python :: 3.12
23
23
  Requires-Python: >= 3.9
24
24
  License-File: LICENSE.txt
25
- Requires-Dist: botocore (==1.38.0)
25
+ Requires-Dist: botocore (==1.38.2)
26
26
  Requires-Dist: docutils (<=0.19,>=0.18.1)
27
27
  Requires-Dist: s3transfer (<0.13.0,>=0.12.0)
28
28
  Requires-Dist: PyYAML (<6.1,>=3.10)
@@ -1,4 +1,4 @@
1
- awscli/__init__.py,sha256=lqH2bYrY4ObBhRMP0wAnp8OlOUJf7gKutquFfZIs5aM,1533
1
+ awscli/__init__.py,sha256=JohZDcJeb2LVCqSjp_OWzedvf2OWX5wkUX2axYh7Vic,1533
2
2
  awscli/__main__.py,sha256=iBjOg0tBxNlhzTi_tyc1G0SMGBvHMVvBJzX3JqYaooY,662
3
3
  awscli/alias.py,sha256=Jj2jetpajUMcjqx9tFhHUOKpzLChQygnH2zqDFfmgIM,11315
4
4
  awscli/argparser.py,sha256=3Pxx-vWytdV985Y6MIl9DeutUXyehIvACIs_PDby8GI,7650
@@ -11,7 +11,7 @@ awscli/compat.py,sha256=rdygqFsDwb2W_0ehi7PLEA6u49yh-8UoUMIPi0LKIoU,16451
11
11
  awscli/completer.py,sha256=vNCS1kr1Q_JO8fLh5YGwfUK3sSaDp3k8rrpa_cCIgY4,5986
12
12
  awscli/errorhandler.py,sha256=2bIBZrKvFICKAhoD180Cx7rRX608pG9RHsmlAcRb0wc,3139
13
13
  awscli/formatter.py,sha256=EI_dUo5uGf2YxWg5js4un_cksF5h58KuvOkkmptuu4o,10951
14
- awscli/handlers.py,sha256=1EohF1cebRLI0OhVgggFgV65tz4iWIyie_eyufLpkBU,10786
14
+ awscli/handlers.py,sha256=DnohUbHeBpg4DGCL5LCz9KZsh5k2TkIlZDwxR0XLeTQ,10934
15
15
  awscli/help.py,sha256=-u2OtAdW9X8891FBA70xUC5Ky9lhjiWgtbh4hm-DoW8,14205
16
16
  awscli/paramfile.py,sha256=Am_eFAIvtH4dMlWdUzMXY0IGEiZyGZ5knXyJBTIs5vM,10885
17
17
  awscli/plugin.py,sha256=B3wgRerhgFK1v-QQeASYv2VNLSa9oMuD4X_hcLSescI,2265
@@ -72,6 +72,7 @@ awscli/customizations/scalarparse.py,sha256=LIcIwHLHzFR1vQboh58N3spPEcR9IF2Wk9f-
72
72
  awscli/customizations/sessendemail.py,sha256=uWgx-f0ILiTGKyjoQcJWx8XoG-BIWUkWNBy-yXvYpTU,4459
73
73
  awscli/customizations/sessionmanager.py,sha256=751EorlValgvZJi56kuWs54huzWAhw5SZNc3m20Vds8,7047
74
74
  awscli/customizations/sms_voice.py,sha256=ZBbvUspzdn7maGzk4tnERA3zMTR3cSbTL0Son6L9Apc,816
75
+ awscli/customizations/socialmessaging.py,sha256=kTD-t7bILCqOMNW3orhxkYHgZwWK-ZF4aRXgI6ixlW8,1043
75
76
  awscli/customizations/streamingoutputarg.py,sha256=l_najvumCkwFy40GfKSRyhf3xzjkaYwuPiDZ2RwWNtk,3900
76
77
  awscli/customizations/toplevelbool.py,sha256=3ssyh2UCwR0qM-HQH0xpBgXjVSSPzYw5II4E_wSjj3A,5902
77
78
  awscli/customizations/translate.py,sha256=rqDoDtCHjv_yYqXoR2OIOSws1txtTVTeddLWAVZ6GjE,2458
@@ -140,7 +141,7 @@ awscli/customizations/eks/exceptions.py,sha256=5Z3HntwF4htYVLK7oMgyCGSyd6Tou1DQ2
140
141
  awscli/customizations/eks/get_token.py,sha256=f-C483JqEOvv7yDXtgn1qexDCLD-gIvMV5Zpe2LZ_-E,9939
141
142
  awscli/customizations/eks/kubeconfig.py,sha256=hBJwzR0ajab3zBtd6xR7ObeOKKsfJi6qz9TN5ItMCC0,9730
142
143
  awscli/customizations/eks/ordered_yaml.py,sha256=81AoykbFpC6-k8m_3vyXRb3RM76mVtbzAI4PEPFKd4o,1864
143
- awscli/customizations/eks/update_kubeconfig.py,sha256=5t5rrR-W0N9diDsC0sn-N5dO6o9QfaoQBqevmFGBqS4,12941
144
+ awscli/customizations/eks/update_kubeconfig.py,sha256=dWinBHJoWzodRp7Sgkq3mAeeaYp-l7f8S3Hk58jhvGc,13870
144
145
  awscli/customizations/emr/__init__.py,sha256=_5TbmyGbXMuErfCQRk40A91pi_Z7qVDO-_4GVyOz41U,565
145
146
  awscli/customizations/emr/addinstancegroups.py,sha256=TFKsjwLo26TQR25IpCr8sMh58jEx4Gx4_tLUcF9bY_c,2647
146
147
  awscli/customizations/emr/addsteps.py,sha256=2OXYlJ-bm2BH3mNSnQjgwz6HoB0cnUR7s_Y5zI_WPP8,2208
@@ -6117,13 +6118,13 @@ awscli/topics/return-codes.rst,sha256=d9lpNFZwD75IiYcDEADQzu-4QiR8P28UPHkrNwPV5J
6117
6118
  awscli/topics/s3-config.rst,sha256=5EIVd4ggLBHtzjtHFvQp9hY415yMGZiG7S_rO9qy2t0,11663
6118
6119
  awscli/topics/s3-faq.rst,sha256=Kw1w4NFHOTXq9Mz5S3HHw3mBkyeEzH4ruB0PD6-EO1c,2938
6119
6120
  awscli/topics/topic-tags.json,sha256=6lUSrs3FKCZNRSQMnjcXNgWyRNGjZIeur1988a4IO5o,1577
6120
- awscli-1.39.0.data/scripts/aws,sha256=r24FExgs0-JjILTQ3XZAqXBYE4SV6UMTtALkLGAj86g,805
6121
- awscli-1.39.0.data/scripts/aws.cmd,sha256=s46DkC6LNgX63CIkzxxbPnFMJ6DRDBkvc88GnWa8Pvg,1432
6122
- awscli-1.39.0.data/scripts/aws_bash_completer,sha256=RRpoEGJRagRzyHZKZZOwpltuVYv2EoiZsdXhmyWPZ54,204
6123
- awscli-1.39.0.data/scripts/aws_completer,sha256=oC9kuMDlWE47dWk_4xjPde2PQvN-M0vND0J4YSLabVQ,1126
6124
- awscli-1.39.0.data/scripts/aws_zsh_completer.sh,sha256=Qm6Z8ejNAMzpJjaT0pzqxbSDT2zxdmzVe5haRA7qLoc,1808
6125
- awscli-1.39.0.dist-info/LICENSE.txt,sha256=o5XhFlwu0OK_BBrijlKCRa7dQAm36UrUB3gCV_cEr8E,549
6126
- awscli-1.39.0.dist-info/METADATA,sha256=qDVhsA_WEMYexoI7Rkk90ibUiJWHvykj_eOS9S7Mm0o,11053
6127
- awscli-1.39.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
6128
- awscli-1.39.0.dist-info/top_level.txt,sha256=vt9wXFr1_nGYK6abhJgt6zY3fULe4JSZedm_5XOM9S0,7
6129
- awscli-1.39.0.dist-info/RECORD,,
6121
+ awscli-1.40.1.data/scripts/aws,sha256=r24FExgs0-JjILTQ3XZAqXBYE4SV6UMTtALkLGAj86g,805
6122
+ awscli-1.40.1.data/scripts/aws.cmd,sha256=s46DkC6LNgX63CIkzxxbPnFMJ6DRDBkvc88GnWa8Pvg,1432
6123
+ awscli-1.40.1.data/scripts/aws_bash_completer,sha256=RRpoEGJRagRzyHZKZZOwpltuVYv2EoiZsdXhmyWPZ54,204
6124
+ awscli-1.40.1.data/scripts/aws_completer,sha256=oC9kuMDlWE47dWk_4xjPde2PQvN-M0vND0J4YSLabVQ,1126
6125
+ awscli-1.40.1.data/scripts/aws_zsh_completer.sh,sha256=Qm6Z8ejNAMzpJjaT0pzqxbSDT2zxdmzVe5haRA7qLoc,1808
6126
+ awscli-1.40.1.dist-info/LICENSE.txt,sha256=o5XhFlwu0OK_BBrijlKCRa7dQAm36UrUB3gCV_cEr8E,549
6127
+ awscli-1.40.1.dist-info/METADATA,sha256=xYSpFEA_NW4kPUtyOCY7epXVRsCrZTl4wGP7eMY8qQA,11053
6128
+ awscli-1.40.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
6129
+ awscli-1.40.1.dist-info/top_level.txt,sha256=vt9wXFr1_nGYK6abhJgt6zY3fULe4JSZedm_5XOM9S0,7
6130
+ awscli-1.40.1.dist-info/RECORD,,
File without changes