tencentcloud-sdk-python-common 3.0.1442__tar.gz → 3.0.1444__tar.gz

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.

Potentially problematic release.


This version of tencentcloud-sdk-python-common might be problematic. Click here for more details.

Files changed (26) hide show
  1. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/PKG-INFO +1 -1
  2. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/__init__.py +1 -1
  3. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/credential.py +20 -2
  4. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud_sdk_python_common.egg-info/PKG-INFO +1 -1
  5. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/README.rst +0 -0
  6. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/setup.cfg +0 -0
  7. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/setup.py +0 -0
  8. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/__init__.py +0 -0
  9. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/abstract_client.py +0 -0
  10. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/abstract_model.py +0 -0
  11. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/circuit_breaker.py +0 -0
  12. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/common_client.py +0 -0
  13. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/exception/__init__.py +0 -0
  14. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/exception/tencent_cloud_sdk_exception.py +0 -0
  15. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/http/__init__.py +0 -0
  16. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/http/pre_conn.py +0 -0
  17. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/http/request.py +0 -0
  18. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/profile/__init__.py +0 -0
  19. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/profile/client_profile.py +0 -0
  20. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/profile/http_profile.py +0 -0
  21. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/retry.py +0 -0
  22. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud/common/sign.py +0 -0
  23. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud_sdk_python_common.egg-info/SOURCES.txt +0 -0
  24. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud_sdk_python_common.egg-info/dependency_links.txt +0 -0
  25. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud_sdk_python_common.egg-info/requires.txt +0 -0
  26. {tencentcloud-sdk-python-common-3.0.1442 → tencentcloud-sdk-python-common-3.0.1444}/tencentcloud_sdk_python_common.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: tencentcloud-sdk-python-common
3
- Version: 3.0.1442
3
+ Version: 3.0.1444
4
4
  Summary: Tencent Cloud Common SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.0.1442'
17
+ __version__ = '3.0.1444'
@@ -388,14 +388,17 @@ class OIDCRoleArnCredential(object):
388
388
  _service = "sts"
389
389
  _action = 'AssumeRoleWithWebIdentity'
390
390
  _default_session_name = 'tencentcloud-python-sdk-'
391
+ _endpoint = "sts.tencentcloudapi.com"
391
392
 
392
- def __init__(self, region, provider_id, web_identity_token, role_arn, role_session_name, duration_seconds=7200):
393
+ def __init__(self, region, provider_id, web_identity_token, role_arn, role_session_name, duration_seconds=7200, endpoint=None):
393
394
  self._region = region
394
395
  self._provider_id = provider_id
395
396
  self._web_identity_token = web_identity_token
396
397
  self._role_arn = role_arn
397
398
  self._role_session_name = role_session_name
398
399
  self._duration_seconds = duration_seconds
400
+ if endpoint:
401
+ self._endpoint = endpoint
399
402
 
400
403
  self._token = None
401
404
  self._tmp_secret_id = None
@@ -428,6 +431,14 @@ class OIDCRoleArnCredential(object):
428
431
  self._keep_fresh()
429
432
  return self._token
430
433
 
434
+ @property
435
+ def endpoint(self):
436
+ return self._endpoint
437
+
438
+ @endpoint.setter
439
+ def endpoint(self, endpoint):
440
+ self._endpoint = endpoint
441
+
431
442
  def _keep_fresh(self):
432
443
  if None in [self._token, self._tmp_secret_key, self._tmp_secret_id] or self._expired_time < int(time.time()):
433
444
  self.refresh()
@@ -435,7 +446,14 @@ class OIDCRoleArnCredential(object):
435
446
  def refresh(self):
436
447
  if self._is_tke:
437
448
  self._init_from_tke()
438
- common_client = CommonClient(credential=None, region=self._region, version=self._version, service=self._service)
449
+
450
+ http_profile = HttpProfile()
451
+ http_profile.endpoint = self._endpoint
452
+ client_profile = ClientProfile()
453
+ client_profile.httpProfile = http_profile
454
+
455
+ common_client = CommonClient(credential=None, region=self._region, version=self._version,
456
+ service=self._service, profile=client_profile)
439
457
  params = {
440
458
  "ProviderId": self._provider_id,
441
459
  "WebIdentityToken": self._web_identity_token,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: tencentcloud-sdk-python-common
3
- Version: 3.0.1442
3
+ Version: 3.0.1444
4
4
  Summary: Tencent Cloud Common SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud