awscli 1.39.0__py3-none-any.whl → 1.40.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- awscli/__init__.py +1 -1
- awscli/customizations/eks/update_kubeconfig.py +44 -21
- {awscli-1.39.0.dist-info → awscli-1.40.0.dist-info}/METADATA +2 -2
- {awscli-1.39.0.dist-info → awscli-1.40.0.dist-info}/RECORD +12 -12
- {awscli-1.39.0.data → awscli-1.40.0.data}/scripts/aws +0 -0
- {awscli-1.39.0.data → awscli-1.40.0.data}/scripts/aws.cmd +0 -0
- {awscli-1.39.0.data → awscli-1.40.0.data}/scripts/aws_bash_completer +0 -0
- {awscli-1.39.0.data → awscli-1.40.0.data}/scripts/aws_completer +0 -0
- {awscli-1.39.0.data → awscli-1.40.0.data}/scripts/aws_zsh_completer.sh +0 -0
- {awscli-1.39.0.dist-info → awscli-1.40.0.dist-info}/LICENSE.txt +0 -0
- {awscli-1.39.0.dist-info → awscli-1.40.0.dist-info}/WHEEL +0 -0
- {awscli-1.39.0.dist-info → awscli-1.40.0.dist-info}/top_level.txt +0 -0
awscli/__init__.py
CHANGED
@@ -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
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
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
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: awscli
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.40.0
|
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.
|
25
|
+
Requires-Dist: botocore (==1.38.1)
|
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=
|
1
|
+
awscli/__init__.py,sha256=nGG7Tzl1pkgJEQgjrAE2TBPjQd_nEP0HuQ5ILe9snDE,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
|
@@ -140,7 +140,7 @@ awscli/customizations/eks/exceptions.py,sha256=5Z3HntwF4htYVLK7oMgyCGSyd6Tou1DQ2
|
|
140
140
|
awscli/customizations/eks/get_token.py,sha256=f-C483JqEOvv7yDXtgn1qexDCLD-gIvMV5Zpe2LZ_-E,9939
|
141
141
|
awscli/customizations/eks/kubeconfig.py,sha256=hBJwzR0ajab3zBtd6xR7ObeOKKsfJi6qz9TN5ItMCC0,9730
|
142
142
|
awscli/customizations/eks/ordered_yaml.py,sha256=81AoykbFpC6-k8m_3vyXRb3RM76mVtbzAI4PEPFKd4o,1864
|
143
|
-
awscli/customizations/eks/update_kubeconfig.py,sha256=
|
143
|
+
awscli/customizations/eks/update_kubeconfig.py,sha256=dWinBHJoWzodRp7Sgkq3mAeeaYp-l7f8S3Hk58jhvGc,13870
|
144
144
|
awscli/customizations/emr/__init__.py,sha256=_5TbmyGbXMuErfCQRk40A91pi_Z7qVDO-_4GVyOz41U,565
|
145
145
|
awscli/customizations/emr/addinstancegroups.py,sha256=TFKsjwLo26TQR25IpCr8sMh58jEx4Gx4_tLUcF9bY_c,2647
|
146
146
|
awscli/customizations/emr/addsteps.py,sha256=2OXYlJ-bm2BH3mNSnQjgwz6HoB0cnUR7s_Y5zI_WPP8,2208
|
@@ -6117,13 +6117,13 @@ awscli/topics/return-codes.rst,sha256=d9lpNFZwD75IiYcDEADQzu-4QiR8P28UPHkrNwPV5J
|
|
6117
6117
|
awscli/topics/s3-config.rst,sha256=5EIVd4ggLBHtzjtHFvQp9hY415yMGZiG7S_rO9qy2t0,11663
|
6118
6118
|
awscli/topics/s3-faq.rst,sha256=Kw1w4NFHOTXq9Mz5S3HHw3mBkyeEzH4ruB0PD6-EO1c,2938
|
6119
6119
|
awscli/topics/topic-tags.json,sha256=6lUSrs3FKCZNRSQMnjcXNgWyRNGjZIeur1988a4IO5o,1577
|
6120
|
-
awscli-1.
|
6121
|
-
awscli-1.
|
6122
|
-
awscli-1.
|
6123
|
-
awscli-1.
|
6124
|
-
awscli-1.
|
6125
|
-
awscli-1.
|
6126
|
-
awscli-1.
|
6127
|
-
awscli-1.
|
6128
|
-
awscli-1.
|
6129
|
-
awscli-1.
|
6120
|
+
awscli-1.40.0.data/scripts/aws,sha256=r24FExgs0-JjILTQ3XZAqXBYE4SV6UMTtALkLGAj86g,805
|
6121
|
+
awscli-1.40.0.data/scripts/aws.cmd,sha256=s46DkC6LNgX63CIkzxxbPnFMJ6DRDBkvc88GnWa8Pvg,1432
|
6122
|
+
awscli-1.40.0.data/scripts/aws_bash_completer,sha256=RRpoEGJRagRzyHZKZZOwpltuVYv2EoiZsdXhmyWPZ54,204
|
6123
|
+
awscli-1.40.0.data/scripts/aws_completer,sha256=oC9kuMDlWE47dWk_4xjPde2PQvN-M0vND0J4YSLabVQ,1126
|
6124
|
+
awscli-1.40.0.data/scripts/aws_zsh_completer.sh,sha256=Qm6Z8ejNAMzpJjaT0pzqxbSDT2zxdmzVe5haRA7qLoc,1808
|
6125
|
+
awscli-1.40.0.dist-info/LICENSE.txt,sha256=o5XhFlwu0OK_BBrijlKCRa7dQAm36UrUB3gCV_cEr8E,549
|
6126
|
+
awscli-1.40.0.dist-info/METADATA,sha256=dKClAZbOW82V4H2beuMC6wYQH6ThKGBUnJDOrqW__dY,11053
|
6127
|
+
awscli-1.40.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
6128
|
+
awscli-1.40.0.dist-info/top_level.txt,sha256=vt9wXFr1_nGYK6abhJgt6zY3fULe4JSZedm_5XOM9S0,7
|
6129
|
+
awscli-1.40.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|