tccli-intl-en 3.1.20.1__py2.py3-none-any.whl → 3.1.21.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/ckafka/ckafka_client.py +120 -8
- tccli/services/ckafka/v20190819/api.json +469 -124
- tccli/services/ckafka/v20190819/examples.json +30 -20
- tccli/services/tke/tke_client.py +168 -0
- tccli/services/tke/v20180525/api.json +227 -0
- tccli/services/tke/v20180525/examples.json +24 -0
- {tccli_intl_en-3.1.20.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.1.20.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/RECORD +13 -13
- {tccli_intl_en-3.1.20.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.1.20.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/WHEEL +0 -0
- {tccli_intl_en-3.1.20.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.1.20.1.dist-info → tccli_intl_en-3.1.21.1.dist-info}/top_level.txt +0 -0
tccli/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '3.1.
|
|
1
|
+
__version__ = '3.1.21.1'
|
|
@@ -1227,6 +1227,61 @@ def doCreateRoute(args, parsed_globals):
|
|
|
1227
1227
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1228
1228
|
|
|
1229
1229
|
|
|
1230
|
+
def doDeleteGroupSubscribeTopic(args, parsed_globals):
|
|
1231
|
+
g_param = parse_global_arg(parsed_globals)
|
|
1232
|
+
|
|
1233
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
1234
|
+
cred = credential.CVMRoleCredential()
|
|
1235
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
1236
|
+
cred = credential.STSAssumeRoleCredential(
|
|
1237
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1238
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1239
|
+
)
|
|
1240
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1241
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1242
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1243
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1244
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1245
|
+
else:
|
|
1246
|
+
cred = credential.Credential(
|
|
1247
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
1248
|
+
)
|
|
1249
|
+
http_profile = HttpProfile(
|
|
1250
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
1251
|
+
reqMethod="POST",
|
|
1252
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1253
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1254
|
+
)
|
|
1255
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1256
|
+
if g_param[OptionsDefine.Language]:
|
|
1257
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
1258
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
1259
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1260
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1261
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1262
|
+
model = models.DeleteGroupSubscribeTopicRequest()
|
|
1263
|
+
model.from_json_string(json.dumps(args))
|
|
1264
|
+
start_time = time.time()
|
|
1265
|
+
while True:
|
|
1266
|
+
rsp = client.DeleteGroupSubscribeTopic(model)
|
|
1267
|
+
result = rsp.to_json_string()
|
|
1268
|
+
try:
|
|
1269
|
+
json_obj = json.loads(result)
|
|
1270
|
+
except TypeError as e:
|
|
1271
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1272
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1273
|
+
break
|
|
1274
|
+
cur_time = time.time()
|
|
1275
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1276
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1277
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1278
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1279
|
+
else:
|
|
1280
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1281
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1282
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1283
|
+
|
|
1284
|
+
|
|
1230
1285
|
def doDeleteGroup(args, parsed_globals):
|
|
1231
1286
|
g_param = parse_global_arg(parsed_globals)
|
|
1232
1287
|
|
|
@@ -2382,6 +2437,61 @@ def doInstanceScalingDown(args, parsed_globals):
|
|
|
2382
2437
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2383
2438
|
|
|
2384
2439
|
|
|
2440
|
+
def doDeleteTopic(args, parsed_globals):
|
|
2441
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2442
|
+
|
|
2443
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2444
|
+
cred = credential.CVMRoleCredential()
|
|
2445
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2446
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2447
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2448
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2449
|
+
)
|
|
2450
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2451
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2452
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2453
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2454
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2455
|
+
else:
|
|
2456
|
+
cred = credential.Credential(
|
|
2457
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2458
|
+
)
|
|
2459
|
+
http_profile = HttpProfile(
|
|
2460
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2461
|
+
reqMethod="POST",
|
|
2462
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2463
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2464
|
+
)
|
|
2465
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2466
|
+
if g_param[OptionsDefine.Language]:
|
|
2467
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2468
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2469
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2470
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2471
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2472
|
+
model = models.DeleteTopicRequest()
|
|
2473
|
+
model.from_json_string(json.dumps(args))
|
|
2474
|
+
start_time = time.time()
|
|
2475
|
+
while True:
|
|
2476
|
+
rsp = client.DeleteTopic(model)
|
|
2477
|
+
result = rsp.to_json_string()
|
|
2478
|
+
try:
|
|
2479
|
+
json_obj = json.loads(result)
|
|
2480
|
+
except TypeError as e:
|
|
2481
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2482
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2483
|
+
break
|
|
2484
|
+
cur_time = time.time()
|
|
2485
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2486
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2487
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2488
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2489
|
+
else:
|
|
2490
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2491
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2492
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2493
|
+
|
|
2494
|
+
|
|
2385
2495
|
def doDescribeGroupOffsets(args, parsed_globals):
|
|
2386
2496
|
g_param = parse_global_arg(parsed_globals)
|
|
2387
2497
|
|
|
@@ -3317,7 +3427,7 @@ def doDescribeRegion(args, parsed_globals):
|
|
|
3317
3427
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3318
3428
|
|
|
3319
3429
|
|
|
3320
|
-
def
|
|
3430
|
+
def doDescribeModifyType(args, parsed_globals):
|
|
3321
3431
|
g_param = parse_global_arg(parsed_globals)
|
|
3322
3432
|
|
|
3323
3433
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3349,11 +3459,11 @@ def doDescribeTopic(args, parsed_globals):
|
|
|
3349
3459
|
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3350
3460
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3351
3461
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3352
|
-
model = models.
|
|
3462
|
+
model = models.DescribeModifyTypeRequest()
|
|
3353
3463
|
model.from_json_string(json.dumps(args))
|
|
3354
3464
|
start_time = time.time()
|
|
3355
3465
|
while True:
|
|
3356
|
-
rsp = client.
|
|
3466
|
+
rsp = client.DescribeModifyType(model)
|
|
3357
3467
|
result = rsp.to_json_string()
|
|
3358
3468
|
try:
|
|
3359
3469
|
json_obj = json.loads(result)
|
|
@@ -3427,7 +3537,7 @@ def doModifyInstancePre(args, parsed_globals):
|
|
|
3427
3537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3428
3538
|
|
|
3429
3539
|
|
|
3430
|
-
def
|
|
3540
|
+
def doDescribeTopic(args, parsed_globals):
|
|
3431
3541
|
g_param = parse_global_arg(parsed_globals)
|
|
3432
3542
|
|
|
3433
3543
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3459,11 +3569,11 @@ def doDeleteTopic(args, parsed_globals):
|
|
|
3459
3569
|
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3460
3570
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3461
3571
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3462
|
-
model = models.
|
|
3572
|
+
model = models.DescribeTopicRequest()
|
|
3463
3573
|
model.from_json_string(json.dumps(args))
|
|
3464
3574
|
start_time = time.time()
|
|
3465
3575
|
while True:
|
|
3466
|
-
rsp = client.
|
|
3576
|
+
rsp = client.DescribeTopic(model)
|
|
3467
3577
|
result = rsp.to_json_string()
|
|
3468
3578
|
try:
|
|
3469
3579
|
json_obj = json.loads(result)
|
|
@@ -3625,6 +3735,7 @@ ACTION_MAP = {
|
|
|
3625
3735
|
"DescribeCvmInfo": doDescribeCvmInfo,
|
|
3626
3736
|
"DescribeDatahubTopic": doDescribeDatahubTopic,
|
|
3627
3737
|
"CreateRoute": doCreateRoute,
|
|
3738
|
+
"DeleteGroupSubscribeTopic": doDeleteGroupSubscribeTopic,
|
|
3628
3739
|
"DeleteGroup": doDeleteGroup,
|
|
3629
3740
|
"ModifyDatahubTopic": doModifyDatahubTopic,
|
|
3630
3741
|
"FetchMessageListByOffset": doFetchMessageListByOffset,
|
|
@@ -3646,6 +3757,7 @@ ACTION_MAP = {
|
|
|
3646
3757
|
"BatchModifyGroupOffsets": doBatchModifyGroupOffsets,
|
|
3647
3758
|
"DeleteAcl": doDeleteAcl,
|
|
3648
3759
|
"InstanceScalingDown": doInstanceScalingDown,
|
|
3760
|
+
"DeleteTopic": doDeleteTopic,
|
|
3649
3761
|
"DescribeGroupOffsets": doDescribeGroupOffsets,
|
|
3650
3762
|
"DeleteInstancePre": doDeleteInstancePre,
|
|
3651
3763
|
"DescribeInstanceAttributes": doDescribeInstanceAttributes,
|
|
@@ -3663,9 +3775,9 @@ ACTION_MAP = {
|
|
|
3663
3775
|
"ModifyInstanceAttributes": doModifyInstanceAttributes,
|
|
3664
3776
|
"DescribeCkafkaZone": doDescribeCkafkaZone,
|
|
3665
3777
|
"DescribeRegion": doDescribeRegion,
|
|
3666
|
-
"
|
|
3778
|
+
"DescribeModifyType": doDescribeModifyType,
|
|
3667
3779
|
"ModifyInstancePre": doModifyInstancePre,
|
|
3668
|
-
"
|
|
3780
|
+
"DescribeTopic": doDescribeTopic,
|
|
3669
3781
|
"InquireCkafkaPrice": doInquireCkafkaPrice,
|
|
3670
3782
|
"ModifyTopicAttributes": doModifyTopicAttributes,
|
|
3671
3783
|
|