tccli 3.0.1193.1__py2.py3-none-any.whl → 3.0.1195.1__py2.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.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +3 -0
- tccli/services/cdb/v20170320/api.json +45 -0
- tccli/services/cfw/v20190904/api.json +4 -4
- tccli/services/csip/v20221121/api.json +1 -1
- tccli/services/mqtt/__init__.py +4 -0
- tccli/services/mqtt/mqtt_client.py +248 -0
- tccli/services/mqtt/v20240516/api.json +612 -0
- tccli/services/mqtt/v20240516/examples.json +27 -0
- tccli/services/tke/tke_client.py +118 -12
- tccli/services/tke/v20180525/api.json +336 -15
- tccli/services/tke/v20180525/examples.json +16 -0
- tccli/services/vpc/v20170312/api.json +10 -0
- {tccli-3.0.1193.1.dist-info → tccli-3.0.1195.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1193.1.dist-info → tccli-3.0.1195.1.dist-info}/RECORD +18 -14
- {tccli-3.0.1193.1.dist-info → tccli-3.0.1195.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1193.1.dist-info → tccli-3.0.1195.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1193.1.dist-info → tccli-3.0.1195.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/tke/tke_client.py
CHANGED
@@ -7715,7 +7715,7 @@ def doDeletePrometheusRecordRuleYaml(args, parsed_globals):
|
|
7715
7715
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7716
7716
|
|
7717
7717
|
|
7718
|
-
def
|
7718
|
+
def doModifyPrometheusConfig(args, parsed_globals):
|
7719
7719
|
g_param = parse_global_arg(parsed_globals)
|
7720
7720
|
|
7721
7721
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7744,11 +7744,11 @@ def doDescribeBackupStorageLocations(args, parsed_globals):
|
|
7744
7744
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
7745
7745
|
client._sdkVersion += ("_CLI_" + __version__)
|
7746
7746
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7747
|
-
model = models.
|
7747
|
+
model = models.ModifyPrometheusConfigRequest()
|
7748
7748
|
model.from_json_string(json.dumps(args))
|
7749
7749
|
start_time = time.time()
|
7750
7750
|
while True:
|
7751
|
-
rsp = client.
|
7751
|
+
rsp = client.ModifyPrometheusConfig(model)
|
7752
7752
|
result = rsp.to_json_string()
|
7753
7753
|
try:
|
7754
7754
|
json_obj = json.loads(result)
|
@@ -8547,7 +8547,7 @@ def doGetMostSuitableImageCache(args, parsed_globals):
|
|
8547
8547
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8548
8548
|
|
8549
8549
|
|
8550
|
-
def
|
8550
|
+
def doDescribeOpenPolicyList(args, parsed_globals):
|
8551
8551
|
g_param = parse_global_arg(parsed_globals)
|
8552
8552
|
|
8553
8553
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -8576,11 +8576,11 @@ def doDescribeClusterEndpoints(args, parsed_globals):
|
|
8576
8576
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
8577
8577
|
client._sdkVersion += ("_CLI_" + __version__)
|
8578
8578
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8579
|
-
model = models.
|
8579
|
+
model = models.DescribeOpenPolicyListRequest()
|
8580
8580
|
model.from_json_string(json.dumps(args))
|
8581
8581
|
start_time = time.time()
|
8582
8582
|
while True:
|
8583
|
-
rsp = client.
|
8583
|
+
rsp = client.DescribeOpenPolicyList(model)
|
8584
8584
|
result = rsp.to_json_string()
|
8585
8585
|
try:
|
8586
8586
|
json_obj = json.loads(result)
|
@@ -9067,6 +9067,58 @@ def doDescribePrometheusAgents(args, parsed_globals):
|
|
9067
9067
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9068
9068
|
|
9069
9069
|
|
9070
|
+
def doModifyOpenPolicyList(args, parsed_globals):
|
9071
|
+
g_param = parse_global_arg(parsed_globals)
|
9072
|
+
|
9073
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
9074
|
+
cred = credential.CVMRoleCredential()
|
9075
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9076
|
+
cred = credential.STSAssumeRoleCredential(
|
9077
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9078
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9079
|
+
)
|
9080
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9081
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
9082
|
+
else:
|
9083
|
+
cred = credential.Credential(
|
9084
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
9085
|
+
)
|
9086
|
+
http_profile = HttpProfile(
|
9087
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
9088
|
+
reqMethod="POST",
|
9089
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
9090
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
9091
|
+
)
|
9092
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
9093
|
+
if g_param[OptionsDefine.Language]:
|
9094
|
+
profile.language = g_param[OptionsDefine.Language]
|
9095
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
9096
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
9097
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
9098
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9099
|
+
model = models.ModifyOpenPolicyListRequest()
|
9100
|
+
model.from_json_string(json.dumps(args))
|
9101
|
+
start_time = time.time()
|
9102
|
+
while True:
|
9103
|
+
rsp = client.ModifyOpenPolicyList(model)
|
9104
|
+
result = rsp.to_json_string()
|
9105
|
+
try:
|
9106
|
+
json_obj = json.loads(result)
|
9107
|
+
except TypeError as e:
|
9108
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
9109
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
9110
|
+
break
|
9111
|
+
cur_time = time.time()
|
9112
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
9113
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
9114
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
9115
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
9116
|
+
else:
|
9117
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
9118
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
9119
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9120
|
+
|
9121
|
+
|
9070
9122
|
def doModifyNodePoolInstanceTypes(args, parsed_globals):
|
9071
9123
|
g_param = parse_global_arg(parsed_globals)
|
9072
9124
|
|
@@ -11719,7 +11771,7 @@ def doUpdateEKSCluster(args, parsed_globals):
|
|
11719
11771
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11720
11772
|
|
11721
11773
|
|
11722
|
-
def
|
11774
|
+
def doDescribeBackupStorageLocations(args, parsed_globals):
|
11723
11775
|
g_param = parse_global_arg(parsed_globals)
|
11724
11776
|
|
11725
11777
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -11748,11 +11800,63 @@ def doModifyPrometheusConfig(args, parsed_globals):
|
|
11748
11800
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
11749
11801
|
client._sdkVersion += ("_CLI_" + __version__)
|
11750
11802
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11751
|
-
model = models.
|
11803
|
+
model = models.DescribeBackupStorageLocationsRequest()
|
11752
11804
|
model.from_json_string(json.dumps(args))
|
11753
11805
|
start_time = time.time()
|
11754
11806
|
while True:
|
11755
|
-
rsp = client.
|
11807
|
+
rsp = client.DescribeBackupStorageLocations(model)
|
11808
|
+
result = rsp.to_json_string()
|
11809
|
+
try:
|
11810
|
+
json_obj = json.loads(result)
|
11811
|
+
except TypeError as e:
|
11812
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
11813
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
11814
|
+
break
|
11815
|
+
cur_time = time.time()
|
11816
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
11817
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
11818
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
11819
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
11820
|
+
else:
|
11821
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
11822
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
11823
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11824
|
+
|
11825
|
+
|
11826
|
+
def doDescribeClusterEndpoints(args, parsed_globals):
|
11827
|
+
g_param = parse_global_arg(parsed_globals)
|
11828
|
+
|
11829
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
11830
|
+
cred = credential.CVMRoleCredential()
|
11831
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11832
|
+
cred = credential.STSAssumeRoleCredential(
|
11833
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11834
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11835
|
+
)
|
11836
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11837
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
11838
|
+
else:
|
11839
|
+
cred = credential.Credential(
|
11840
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
11841
|
+
)
|
11842
|
+
http_profile = HttpProfile(
|
11843
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
11844
|
+
reqMethod="POST",
|
11845
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
11846
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
11847
|
+
)
|
11848
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
11849
|
+
if g_param[OptionsDefine.Language]:
|
11850
|
+
profile.language = g_param[OptionsDefine.Language]
|
11851
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
11852
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
11853
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
11854
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11855
|
+
model = models.DescribeClusterEndpointsRequest()
|
11856
|
+
model.from_json_string(json.dumps(args))
|
11857
|
+
start_time = time.time()
|
11858
|
+
while True:
|
11859
|
+
rsp = client.DescribeClusterEndpoints(model)
|
11756
11860
|
result = rsp.to_json_string()
|
11757
11861
|
try:
|
11758
11862
|
json_obj = json.loads(result)
|
@@ -12244,7 +12348,7 @@ ACTION_MAP = {
|
|
12244
12348
|
"DeleteHealthCheckPolicy": doDeleteHealthCheckPolicy,
|
12245
12349
|
"CreatePrometheusAlertRule": doCreatePrometheusAlertRule,
|
12246
12350
|
"DeletePrometheusRecordRuleYaml": doDeletePrometheusRecordRuleYaml,
|
12247
|
-
"
|
12351
|
+
"ModifyPrometheusConfig": doModifyPrometheusConfig,
|
12248
12352
|
"DeleteClusterInstances": doDeleteClusterInstances,
|
12249
12353
|
"ModifyPrometheusTemp": doModifyPrometheusTemp,
|
12250
12354
|
"ModifyPrometheusRecordRuleYaml": doModifyPrometheusRecordRuleYaml,
|
@@ -12260,7 +12364,7 @@ ACTION_MAP = {
|
|
12260
12364
|
"DescribeECMInstances": doDescribeECMInstances,
|
12261
12365
|
"DeleteTKEEdgeCluster": doDeleteTKEEdgeCluster,
|
12262
12366
|
"GetMostSuitableImageCache": doGetMostSuitableImageCache,
|
12263
|
-
"
|
12367
|
+
"DescribeOpenPolicyList": doDescribeOpenPolicyList,
|
12264
12368
|
"CreatePrometheusClusterAgent": doCreatePrometheusClusterAgent,
|
12265
12369
|
"CreatePrometheusConfig": doCreatePrometheusConfig,
|
12266
12370
|
"DescribeEKSClusterCredential": doDescribeEKSClusterCredential,
|
@@ -12270,6 +12374,7 @@ ACTION_MAP = {
|
|
12270
12374
|
"DescribeClusterRoutes": doDescribeClusterRoutes,
|
12271
12375
|
"DescribePrometheusGlobalConfig": doDescribePrometheusGlobalConfig,
|
12272
12376
|
"DescribePrometheusAgents": doDescribePrometheusAgents,
|
12377
|
+
"ModifyOpenPolicyList": doModifyOpenPolicyList,
|
12273
12378
|
"ModifyNodePoolInstanceTypes": doModifyNodePoolInstanceTypes,
|
12274
12379
|
"DescribeEKSClusters": doDescribeEKSClusters,
|
12275
12380
|
"CheckInstancesUpgradeAble": doCheckInstancesUpgradeAble,
|
@@ -12321,7 +12426,8 @@ ACTION_MAP = {
|
|
12321
12426
|
"DeletePrometheusAlertPolicy": doDeletePrometheusAlertPolicy,
|
12322
12427
|
"RunPrometheusInstance": doRunPrometheusInstance,
|
12323
12428
|
"UpdateEKSCluster": doUpdateEKSCluster,
|
12324
|
-
"
|
12429
|
+
"DescribeBackupStorageLocations": doDescribeBackupStorageLocations,
|
12430
|
+
"DescribeClusterEndpoints": doDescribeClusterEndpoints,
|
12325
12431
|
"DescribePostNodeResources": doDescribePostNodeResources,
|
12326
12432
|
"InstallLogAgent": doInstallLogAgent,
|
12327
12433
|
"CheckEdgeClusterCIDR": doCheckEdgeClusterCIDR,
|