tccli-intl-en 3.0.1282.1__py2.py3-none-any.whl → 3.1.33.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/argument.py +1 -1
- tccli/services/__init__.py +15 -0
- tccli/services/advisor/advisor_client.py +2 -2
- tccli/services/ai3d/__init__.py +4 -0
- tccli/services/ai3d/ai3d_client.py +266 -0
- tccli/services/ai3d/v20250513/api.json +264 -0
- tccli/services/ai3d/v20250513/examples.json +20 -0
- tccli/services/aiart/aiart_client.py +1 -1
- tccli/services/ams/ams_client.py +4 -4
- tccli/services/antiddos/antiddos_client.py +70 -70
- tccli/services/apigateway/apigateway_client.py +93 -93
- tccli/services/apm/apm_client.py +783 -55
- tccli/services/apm/v20210622/api.json +3936 -1145
- tccli/services/apm/v20210622/examples.json +133 -23
- tccli/services/asr/asr_client.py +2 -2
- tccli/services/autoscaling/autoscaling_client.py +58 -58
- tccli/services/autoscaling/v20180419/api.json +77 -27
- tccli/services/batch/batch_client.py +28 -28
- tccli/services/bi/bi_client.py +24 -24
- tccli/services/billing/billing_client.py +42 -42
- tccli/services/cam/cam_client.py +81 -81
- tccli/services/captcha/captcha_client.py +1 -1
- tccli/services/car/car_client.py +33 -33
- tccli/services/cbs/cbs_client.py +38 -38
- tccli/services/ccc/ccc_client.py +70 -70
- tccli/services/ccc/v20200210/api.json +71 -26
- tccli/services/cdb/cdb_client.py +1262 -422
- tccli/services/cdb/v20170320/api.json +2166 -335
- tccli/services/cdb/v20170320/examples.json +126 -6
- tccli/services/cdc/cdc_client.py +20 -20
- tccli/services/cdn/cdn_client.py +44 -44
- tccli/services/cdn/v20180606/api.json +22 -22
- tccli/services/cdn/v20180606/examples.json +1 -1
- tccli/services/cdwdoris/cdwdoris_client.py +77 -77
- tccli/services/cdwpg/cdwpg_client.py +24 -24
- tccli/services/cdz/cdz_client.py +1 -1
- tccli/services/cfg/cfg_client.py +16 -16
- tccli/services/cfs/cfs_client.py +39 -39
- tccli/services/cfw/cfw_client.py +66 -66
- tccli/services/chdfs/chdfs_client.py +29 -29
- tccli/services/ciam/ciam_client.py +16 -16
- tccli/services/ckafka/ckafka_client.py +468 -76
- tccli/services/ckafka/v20190819/api.json +1009 -246
- tccli/services/ckafka/v20190819/examples.json +73 -23
- tccli/services/clb/clb_client.py +720 -384
- tccli/services/clb/v20180317/api.json +2255 -1017
- tccli/services/clb/v20180317/examples.json +184 -124
- tccli/services/cloudaudit/cloudaudit_client.py +18 -18
- tccli/services/cls/cls_client.py +86 -86
- tccli/services/cmq/cmq_client.py +2 -2
- tccli/services/config/config_client.py +6 -6
- tccli/services/controlcenter/controlcenter_client.py +225 -1
- tccli/services/controlcenter/v20230110/api.json +528 -5
- tccli/services/controlcenter/v20230110/examples.json +32 -0
- tccli/services/csip/csip_client.py +34 -34
- tccli/services/ctsdb/ctsdb_client.py +2 -2
- tccli/services/cvm/cvm_client.py +84 -84
- tccli/services/cvm/v20170312/api.json +175 -116
- tccli/services/cvm/v20170312/examples.json +93 -93
- tccli/services/cwp/cwp_client.py +465 -465
- tccli/services/cynosdb/cynosdb_client.py +154 -154
- tccli/services/dataintegration/dataintegration_client.py +1 -1
- tccli/services/dayu/dayu_client.py +103 -103
- tccli/services/dbbrain/dbbrain_client.py +42 -42
- tccli/services/dc/dc_client.py +18 -18
- tccli/services/dcdb/dcdb_client.py +62 -62
- tccli/services/dlc/dlc_client.py +109 -109
- tccli/services/dms/dms_client.py +2 -2
- tccli/services/dnspod/dnspod_client.py +40 -40
- tccli/services/domain/domain_client.py +24 -24
- tccli/services/dts/dts_client.py +83 -83
- tccli/services/eb/eb_client.py +26 -26
- tccli/services/ecdn/ecdn_client.py +15 -15
- tccli/services/ecm/ecm_client.py +124 -124
- tccli/services/eiam/eiam_client.py +40 -40
- tccli/services/emr/emr_client.py +77 -77
- tccli/services/emr/v20190103/api.json +6 -6
- tccli/services/es/es_client.py +21 -21
- tccli/services/facefusion/facefusion_client.py +3 -3
- tccli/services/faceid/faceid_client.py +19 -19
- tccli/services/faceid/v20180301/api.json +124 -46
- tccli/services/gaap/gaap_client.py +88 -88
- tccli/services/gme/gme_client.py +10 -10
- tccli/services/gpm/gpm_client.py +18 -18
- tccli/services/gse/gse_client.py +22 -22
- tccli/services/gwlb/gwlb_client.py +18 -18
- tccli/services/hunyuan/__init__.py +4 -0
- tccli/services/hunyuan/hunyuan_client.py +546 -0
- tccli/services/hunyuan/v20230901/api.json +628 -0
- tccli/services/hunyuan/v20230901/examples.json +60 -0
- tccli/services/iai/iai_client.py +29 -29
- tccli/services/iap/iap_client.py +6 -6
- tccli/services/ims/ims_client.py +1 -1
- tccli/services/intlpartnersmgt/intlpartnersmgt_client.py +42 -42
- tccli/services/iotcloud/iotcloud_client.py +20 -20
- tccli/services/ip/ip_client.py +6 -6
- tccli/services/kms/kms_client.py +68 -68
- tccli/services/kms/v20190118/api.json +80 -3
- tccli/services/kms/v20190118/examples.json +3 -3
- tccli/services/lcic/lcic_client.py +53 -53
- tccli/services/lighthouse/lighthouse_client.py +434 -98
- tccli/services/lighthouse/v20200324/api.json +488 -0
- tccli/services/lighthouse/v20200324/examples.json +54 -0
- tccli/services/live/live_client.py +120 -120
- tccli/services/lke/lke_client.py +90 -90
- tccli/services/lkeap/lkeap_client.py +63 -7
- tccli/services/lkeap/v20240522/api.json +134 -0
- tccli/services/lkeap/v20240522/examples.json +21 -1
- tccli/services/mariadb/mariadb_client.py +50 -50
- tccli/services/mdc/mdc_client.py +18 -18
- tccli/services/mdl/mdl_client.py +225 -57
- tccli/services/mdl/v20200326/api.json +903 -59
- tccli/services/mdl/v20200326/examples.json +24 -0
- tccli/services/mdp/mdp_client.py +62 -62
- tccli/services/mdp/v20200527/api.json +191 -28
- tccli/services/message/message_client.py +1 -1
- tccli/services/mongodb/mongodb_client.py +1081 -129
- tccli/services/mongodb/v20190725/api.json +1798 -141
- tccli/services/mongodb/v20190725/examples.json +136 -0
- tccli/services/monitor/monitor_client.py +149 -149
- tccli/services/monitor/v20180724/api.json +8 -8
- tccli/services/mps/mps_client.py +1118 -278
- tccli/services/mps/v20190612/api.json +2117 -117
- tccli/services/mps/v20190612/examples.json +164 -62
- tccli/services/mqtt/__init__.py +4 -0
- tccli/services/mqtt/mqtt_client.py +1610 -0
- tccli/services/mqtt/v20240516/api.json +3057 -0
- tccli/services/mqtt/v20240516/examples.json +213 -0
- tccli/services/msp/msp_client.py +7 -7
- tccli/services/ocr/ocr_client.py +206 -38
- tccli/services/ocr/v20181119/api.json +726 -83
- tccli/services/ocr/v20181119/examples.json +36 -6
- tccli/services/omics/omics_client.py +20 -20
- tccli/services/organization/organization_client.py +116 -116
- tccli/services/postgres/postgres_client.py +91 -91
- tccli/services/privatedns/privatedns_client.py +31 -31
- tccli/services/pts/pts_client.py +48 -48
- tccli/services/quota/quota_client.py +5 -5
- tccli/services/rce/rce_client.py +1 -1
- tccli/services/redis/redis_client.py +109 -109
- tccli/services/redis/v20180412/api.json +12 -12
- tccli/services/region/region_client.py +3 -3
- tccli/services/rum/rum_client.py +60 -60
- tccli/services/scf/scf_client.py +42 -42
- tccli/services/ses/ses_client.py +29 -29
- tccli/services/smh/__init__.py +4 -0
- tccli/services/smh/smh_client.py +714 -0
- tccli/services/smh/v20210712/api.json +1287 -0
- tccli/services/smh/v20210712/examples.json +85 -0
- tccli/services/sms/sms_client.py +18 -18
- tccli/services/sqlserver/sqlserver_client.py +139 -139
- tccli/services/ssl/ssl_client.py +38 -38
- tccli/services/ssm/ssm_client.py +24 -24
- tccli/services/sts/sts_client.py +5 -5
- tccli/services/tag/tag_client.py +30 -30
- tccli/services/tat/tat_client.py +19 -19
- tccli/services/tbaas/tbaas_client.py +4 -4
- tccli/services/tcaplusdb/tcaplusdb_client.py +52 -52
- tccli/services/tchd/tchd_client.py +1 -1
- tccli/services/tcmpp/tcmpp_client.py +104 -104
- tccli/services/tcr/tcr_client.py +76 -76
- tccli/services/tcsas/tcsas_client.py +2340 -268
- tccli/services/tcsas/v20250106/api.json +8410 -3423
- tccli/services/tcsas/v20250106/examples.json +308 -12
- tccli/services/tcss/tcss_client.py +330 -330
- tccli/services/tdid/tdid_client.py +48 -48
- tccli/services/tdmq/tdmq_client.py +2500 -372
- tccli/services/tdmq/v20200217/api.json +11607 -3958
- tccli/services/tdmq/v20200217/examples.json +562 -264
- tccli/services/tem/tem_client.py +56 -56
- tccli/services/teo/teo_client.py +466 -298
- tccli/services/teo/v20220901/api.json +324 -16
- tccli/services/teo/v20220901/examples.json +64 -22
- tccli/services/tione/tione_client.py +1 -1
- tccli/services/tiw/tiw_client.py +51 -51
- tccli/services/tke/tke_client.py +306 -138
- tccli/services/tke/v20180525/api.json +227 -0
- tccli/services/tke/v20180525/examples.json +24 -0
- tccli/services/tms/tms_client.py +1 -1
- tccli/services/tmt/tmt_client.py +1 -1
- tccli/services/trabbit/trabbit_client.py +29 -29
- tccli/services/trocket/__init__.py +4 -0
- tccli/services/trocket/trocket_client.py +2450 -0
- tccli/services/trocket/v20230308/api.json +6062 -0
- tccli/services/trocket/v20230308/examples.json +339 -0
- tccli/services/trro/trro_client.py +19 -19
- tccli/services/trtc/trtc_client.py +51 -51
- tccli/services/trtc/v20190722/api.json +15 -15
- tccli/services/tts/tts_client.py +1 -1
- tccli/services/vclm/vclm_client.py +2 -2
- tccli/services/vm/vm_client.py +4 -4
- tccli/services/vod/v20180717/api.json +2929 -296
- tccli/services/vod/v20180717/examples.json +40 -6
- tccli/services/vod/vod_client.py +459 -179
- tccli/services/vpc/v20170312/api.json +99 -29
- tccli/services/vpc/v20170312/examples.json +21 -13
- tccli/services/vpc/vpc_client.py +357 -301
- tccli/services/waf/waf_client.py +107 -107
- tccli/services/wedata/wedata_client.py +310 -310
- tccli/services/yunjing/yunjing_client.py +71 -71
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/RECORD +207 -187
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/WHEEL +1 -1
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/top_level.txt +0 -0
|
@@ -42,7 +42,7 @@ def doDescribeRoute(args, parsed_globals):
|
|
|
42
42
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
43
43
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
44
44
|
)
|
|
45
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
45
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
46
46
|
if g_param[OptionsDefine.Language]:
|
|
47
47
|
profile.language = g_param[OptionsDefine.Language]
|
|
48
48
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -97,7 +97,7 @@ def doDescribeGroupInfo(args, parsed_globals):
|
|
|
97
97
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
98
98
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
99
99
|
)
|
|
100
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
100
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
101
101
|
if g_param[OptionsDefine.Language]:
|
|
102
102
|
profile.language = g_param[OptionsDefine.Language]
|
|
103
103
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -152,7 +152,7 @@ def doCreateConsumer(args, parsed_globals):
|
|
|
152
152
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
153
153
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
154
154
|
)
|
|
155
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
155
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
156
156
|
if g_param[OptionsDefine.Language]:
|
|
157
157
|
profile.language = g_param[OptionsDefine.Language]
|
|
158
158
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -207,7 +207,7 @@ def doCreateAcl(args, parsed_globals):
|
|
|
207
207
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
208
208
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
209
209
|
)
|
|
210
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
210
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
211
211
|
if g_param[OptionsDefine.Language]:
|
|
212
212
|
profile.language = g_param[OptionsDefine.Language]
|
|
213
213
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -262,7 +262,7 @@ def doDescribeTypeInstances(args, parsed_globals):
|
|
|
262
262
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
263
263
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
264
264
|
)
|
|
265
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
265
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
266
266
|
if g_param[OptionsDefine.Language]:
|
|
267
267
|
profile.language = g_param[OptionsDefine.Language]
|
|
268
268
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -317,7 +317,7 @@ def doDescribeDatahubTopics(args, parsed_globals):
|
|
|
317
317
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
318
318
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
319
319
|
)
|
|
320
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
320
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
321
321
|
if g_param[OptionsDefine.Language]:
|
|
322
322
|
profile.language = g_param[OptionsDefine.Language]
|
|
323
323
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -372,7 +372,7 @@ def doDescribeAclRule(args, parsed_globals):
|
|
|
372
372
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
373
373
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
374
374
|
)
|
|
375
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
375
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
376
376
|
if g_param[OptionsDefine.Language]:
|
|
377
377
|
profile.language = g_param[OptionsDefine.Language]
|
|
378
378
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -427,7 +427,7 @@ def doCreateTopic(args, parsed_globals):
|
|
|
427
427
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
428
428
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
429
429
|
)
|
|
430
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
430
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
431
431
|
if g_param[OptionsDefine.Language]:
|
|
432
432
|
profile.language = g_param[OptionsDefine.Language]
|
|
433
433
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -482,7 +482,7 @@ def doDescribeSecurityGroupRoutes(args, parsed_globals):
|
|
|
482
482
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
483
483
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
484
484
|
)
|
|
485
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
485
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
486
486
|
if g_param[OptionsDefine.Language]:
|
|
487
487
|
profile.language = g_param[OptionsDefine.Language]
|
|
488
488
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -537,7 +537,7 @@ def doBatchModifyTopicAttributes(args, parsed_globals):
|
|
|
537
537
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
538
538
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
539
539
|
)
|
|
540
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
540
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
541
541
|
if g_param[OptionsDefine.Language]:
|
|
542
542
|
profile.language = g_param[OptionsDefine.Language]
|
|
543
543
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -592,7 +592,7 @@ def doDeleteRoute(args, parsed_globals):
|
|
|
592
592
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
593
593
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
594
594
|
)
|
|
595
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
595
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
596
596
|
if g_param[OptionsDefine.Language]:
|
|
597
597
|
profile.language = g_param[OptionsDefine.Language]
|
|
598
598
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -647,7 +647,7 @@ def doSendMessage(args, parsed_globals):
|
|
|
647
647
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
648
648
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
649
649
|
)
|
|
650
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
650
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
651
651
|
if g_param[OptionsDefine.Language]:
|
|
652
652
|
profile.language = g_param[OptionsDefine.Language]
|
|
653
653
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -702,7 +702,7 @@ def doDescribeUser(args, parsed_globals):
|
|
|
702
702
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
703
703
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
704
704
|
)
|
|
705
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
705
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
706
706
|
if g_param[OptionsDefine.Language]:
|
|
707
707
|
profile.language = g_param[OptionsDefine.Language]
|
|
708
708
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -732,6 +732,61 @@ def doDescribeUser(args, parsed_globals):
|
|
|
732
732
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
733
733
|
|
|
734
734
|
|
|
735
|
+
def doDescribeGroup(args, parsed_globals):
|
|
736
|
+
g_param = parse_global_arg(parsed_globals)
|
|
737
|
+
|
|
738
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
739
|
+
cred = credential.CVMRoleCredential()
|
|
740
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
741
|
+
cred = credential.STSAssumeRoleCredential(
|
|
742
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
743
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
744
|
+
)
|
|
745
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
746
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
747
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
748
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
749
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
750
|
+
else:
|
|
751
|
+
cred = credential.Credential(
|
|
752
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
753
|
+
)
|
|
754
|
+
http_profile = HttpProfile(
|
|
755
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
756
|
+
reqMethod="POST",
|
|
757
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
758
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
759
|
+
)
|
|
760
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
761
|
+
if g_param[OptionsDefine.Language]:
|
|
762
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
763
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
764
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
765
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
766
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
767
|
+
model = models.DescribeGroupRequest()
|
|
768
|
+
model.from_json_string(json.dumps(args))
|
|
769
|
+
start_time = time.time()
|
|
770
|
+
while True:
|
|
771
|
+
rsp = client.DescribeGroup(model)
|
|
772
|
+
result = rsp.to_json_string()
|
|
773
|
+
try:
|
|
774
|
+
json_obj = json.loads(result)
|
|
775
|
+
except TypeError as e:
|
|
776
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
777
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
778
|
+
break
|
|
779
|
+
cur_time = time.time()
|
|
780
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
781
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
782
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
783
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
784
|
+
else:
|
|
785
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
786
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
787
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
788
|
+
|
|
789
|
+
|
|
735
790
|
def doCreateTopicIpWhiteList(args, parsed_globals):
|
|
736
791
|
g_param = parse_global_arg(parsed_globals)
|
|
737
792
|
|
|
@@ -757,7 +812,7 @@ def doCreateTopicIpWhiteList(args, parsed_globals):
|
|
|
757
812
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
758
813
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
759
814
|
)
|
|
760
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
815
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
761
816
|
if g_param[OptionsDefine.Language]:
|
|
762
817
|
profile.language = g_param[OptionsDefine.Language]
|
|
763
818
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -787,7 +842,7 @@ def doCreateTopicIpWhiteList(args, parsed_globals):
|
|
|
787
842
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
788
843
|
|
|
789
844
|
|
|
790
|
-
def
|
|
845
|
+
def doDescribeCkafkaVersion(args, parsed_globals):
|
|
791
846
|
g_param = parse_global_arg(parsed_globals)
|
|
792
847
|
|
|
793
848
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -812,18 +867,18 @@ def doDescribeGroup(args, parsed_globals):
|
|
|
812
867
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
813
868
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
814
869
|
)
|
|
815
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
870
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
816
871
|
if g_param[OptionsDefine.Language]:
|
|
817
872
|
profile.language = g_param[OptionsDefine.Language]
|
|
818
873
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
819
874
|
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
820
875
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
821
876
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
822
|
-
model = models.
|
|
877
|
+
model = models.DescribeCkafkaVersionRequest()
|
|
823
878
|
model.from_json_string(json.dumps(args))
|
|
824
879
|
start_time = time.time()
|
|
825
880
|
while True:
|
|
826
|
-
rsp = client.
|
|
881
|
+
rsp = client.DescribeCkafkaVersion(model)
|
|
827
882
|
result = rsp.to_json_string()
|
|
828
883
|
try:
|
|
829
884
|
json_obj = json.loads(result)
|
|
@@ -867,7 +922,7 @@ def doModifyGroupOffsets(args, parsed_globals):
|
|
|
867
922
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
868
923
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
869
924
|
)
|
|
870
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
925
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
871
926
|
if g_param[OptionsDefine.Language]:
|
|
872
927
|
profile.language = g_param[OptionsDefine.Language]
|
|
873
928
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -897,6 +952,61 @@ def doModifyGroupOffsets(args, parsed_globals):
|
|
|
897
952
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
898
953
|
|
|
899
954
|
|
|
955
|
+
def doUpgradeBrokerVersion(args, parsed_globals):
|
|
956
|
+
g_param = parse_global_arg(parsed_globals)
|
|
957
|
+
|
|
958
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
959
|
+
cred = credential.CVMRoleCredential()
|
|
960
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
961
|
+
cred = credential.STSAssumeRoleCredential(
|
|
962
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
963
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
964
|
+
)
|
|
965
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
966
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
967
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
968
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
969
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
970
|
+
else:
|
|
971
|
+
cred = credential.Credential(
|
|
972
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
973
|
+
)
|
|
974
|
+
http_profile = HttpProfile(
|
|
975
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
976
|
+
reqMethod="POST",
|
|
977
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
978
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
979
|
+
)
|
|
980
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
981
|
+
if g_param[OptionsDefine.Language]:
|
|
982
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
983
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
984
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
985
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
986
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
987
|
+
model = models.UpgradeBrokerVersionRequest()
|
|
988
|
+
model.from_json_string(json.dumps(args))
|
|
989
|
+
start_time = time.time()
|
|
990
|
+
while True:
|
|
991
|
+
rsp = client.UpgradeBrokerVersion(model)
|
|
992
|
+
result = rsp.to_json_string()
|
|
993
|
+
try:
|
|
994
|
+
json_obj = json.loads(result)
|
|
995
|
+
except TypeError as e:
|
|
996
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
997
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
998
|
+
break
|
|
999
|
+
cur_time = time.time()
|
|
1000
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1001
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1002
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1003
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1004
|
+
else:
|
|
1005
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1006
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1007
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1008
|
+
|
|
1009
|
+
|
|
900
1010
|
def doDescribeInstances(args, parsed_globals):
|
|
901
1011
|
g_param = parse_global_arg(parsed_globals)
|
|
902
1012
|
|
|
@@ -922,7 +1032,7 @@ def doDescribeInstances(args, parsed_globals):
|
|
|
922
1032
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
923
1033
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
924
1034
|
)
|
|
925
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1035
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
926
1036
|
if g_param[OptionsDefine.Language]:
|
|
927
1037
|
profile.language = g_param[OptionsDefine.Language]
|
|
928
1038
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -977,7 +1087,7 @@ def doDescribeCvmInfo(args, parsed_globals):
|
|
|
977
1087
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
978
1088
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
979
1089
|
)
|
|
980
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1090
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
981
1091
|
if g_param[OptionsDefine.Language]:
|
|
982
1092
|
profile.language = g_param[OptionsDefine.Language]
|
|
983
1093
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1032,7 +1142,7 @@ def doDescribeDatahubTopic(args, parsed_globals):
|
|
|
1032
1142
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1033
1143
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1034
1144
|
)
|
|
1035
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1145
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1036
1146
|
if g_param[OptionsDefine.Language]:
|
|
1037
1147
|
profile.language = g_param[OptionsDefine.Language]
|
|
1038
1148
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1087,7 +1197,7 @@ def doCreateRoute(args, parsed_globals):
|
|
|
1087
1197
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1088
1198
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1089
1199
|
)
|
|
1090
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1200
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1091
1201
|
if g_param[OptionsDefine.Language]:
|
|
1092
1202
|
profile.language = g_param[OptionsDefine.Language]
|
|
1093
1203
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1117,6 +1227,116 @@ def doCreateRoute(args, parsed_globals):
|
|
|
1117
1227
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1118
1228
|
|
|
1119
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
|
+
|
|
1285
|
+
def doDeleteGroup(args, parsed_globals):
|
|
1286
|
+
g_param = parse_global_arg(parsed_globals)
|
|
1287
|
+
|
|
1288
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
1289
|
+
cred = credential.CVMRoleCredential()
|
|
1290
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
1291
|
+
cred = credential.STSAssumeRoleCredential(
|
|
1292
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1293
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1294
|
+
)
|
|
1295
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1296
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1297
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1298
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1299
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1300
|
+
else:
|
|
1301
|
+
cred = credential.Credential(
|
|
1302
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
1303
|
+
)
|
|
1304
|
+
http_profile = HttpProfile(
|
|
1305
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
1306
|
+
reqMethod="POST",
|
|
1307
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1308
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1309
|
+
)
|
|
1310
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1311
|
+
if g_param[OptionsDefine.Language]:
|
|
1312
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
1313
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
1314
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1315
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1316
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1317
|
+
model = models.DeleteGroupRequest()
|
|
1318
|
+
model.from_json_string(json.dumps(args))
|
|
1319
|
+
start_time = time.time()
|
|
1320
|
+
while True:
|
|
1321
|
+
rsp = client.DeleteGroup(model)
|
|
1322
|
+
result = rsp.to_json_string()
|
|
1323
|
+
try:
|
|
1324
|
+
json_obj = json.loads(result)
|
|
1325
|
+
except TypeError as e:
|
|
1326
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1327
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1328
|
+
break
|
|
1329
|
+
cur_time = time.time()
|
|
1330
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1331
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1332
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1333
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1334
|
+
else:
|
|
1335
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1336
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1337
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1338
|
+
|
|
1339
|
+
|
|
1120
1340
|
def doModifyDatahubTopic(args, parsed_globals):
|
|
1121
1341
|
g_param = parse_global_arg(parsed_globals)
|
|
1122
1342
|
|
|
@@ -1142,7 +1362,7 @@ def doModifyDatahubTopic(args, parsed_globals):
|
|
|
1142
1362
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1143
1363
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1144
1364
|
)
|
|
1145
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1365
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1146
1366
|
if g_param[OptionsDefine.Language]:
|
|
1147
1367
|
profile.language = g_param[OptionsDefine.Language]
|
|
1148
1368
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1197,7 +1417,7 @@ def doFetchMessageListByOffset(args, parsed_globals):
|
|
|
1197
1417
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1198
1418
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1199
1419
|
)
|
|
1200
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1420
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1201
1421
|
if g_param[OptionsDefine.Language]:
|
|
1202
1422
|
profile.language = g_param[OptionsDefine.Language]
|
|
1203
1423
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1252,7 +1472,7 @@ def doCreateDatahubTopic(args, parsed_globals):
|
|
|
1252
1472
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1253
1473
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1254
1474
|
)
|
|
1255
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1475
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1256
1476
|
if g_param[OptionsDefine.Language]:
|
|
1257
1477
|
profile.language = g_param[OptionsDefine.Language]
|
|
1258
1478
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1307,7 +1527,7 @@ def doDeleteInstancePost(args, parsed_globals):
|
|
|
1307
1527
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1308
1528
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1309
1529
|
)
|
|
1310
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1530
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1311
1531
|
if g_param[OptionsDefine.Language]:
|
|
1312
1532
|
profile.language = g_param[OptionsDefine.Language]
|
|
1313
1533
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1362,7 +1582,7 @@ def doDescribeACL(args, parsed_globals):
|
|
|
1362
1582
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1363
1583
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1364
1584
|
)
|
|
1365
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1585
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1366
1586
|
if g_param[OptionsDefine.Language]:
|
|
1367
1587
|
profile.language = g_param[OptionsDefine.Language]
|
|
1368
1588
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1417,7 +1637,7 @@ def doDescribeTopicDetail(args, parsed_globals):
|
|
|
1417
1637
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1418
1638
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1419
1639
|
)
|
|
1420
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1640
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1421
1641
|
if g_param[OptionsDefine.Language]:
|
|
1422
1642
|
profile.language = g_param[OptionsDefine.Language]
|
|
1423
1643
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1472,7 +1692,7 @@ def doCreateInstancePre(args, parsed_globals):
|
|
|
1472
1692
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1473
1693
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1474
1694
|
)
|
|
1475
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1695
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1476
1696
|
if g_param[OptionsDefine.Language]:
|
|
1477
1697
|
profile.language = g_param[OptionsDefine.Language]
|
|
1478
1698
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1527,7 +1747,7 @@ def doFetchMessageByOffset(args, parsed_globals):
|
|
|
1527
1747
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1528
1748
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1529
1749
|
)
|
|
1530
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1750
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1531
1751
|
if g_param[OptionsDefine.Language]:
|
|
1532
1752
|
profile.language = g_param[OptionsDefine.Language]
|
|
1533
1753
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1582,7 +1802,7 @@ def doDeleteTopicIpWhiteList(args, parsed_globals):
|
|
|
1582
1802
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1583
1803
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1584
1804
|
)
|
|
1585
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1805
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1586
1806
|
if g_param[OptionsDefine.Language]:
|
|
1587
1807
|
profile.language = g_param[OptionsDefine.Language]
|
|
1588
1808
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1637,7 +1857,7 @@ def doModifyPassword(args, parsed_globals):
|
|
|
1637
1857
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1638
1858
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1639
1859
|
)
|
|
1640
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1860
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1641
1861
|
if g_param[OptionsDefine.Language]:
|
|
1642
1862
|
profile.language = g_param[OptionsDefine.Language]
|
|
1643
1863
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1692,7 +1912,7 @@ def doDescribeConsumerGroup(args, parsed_globals):
|
|
|
1692
1912
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1693
1913
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1694
1914
|
)
|
|
1695
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1915
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1696
1916
|
if g_param[OptionsDefine.Language]:
|
|
1697
1917
|
profile.language = g_param[OptionsDefine.Language]
|
|
1698
1918
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1747,7 +1967,7 @@ def doDescribeTopicSubscribeGroup(args, parsed_globals):
|
|
|
1747
1967
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1748
1968
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1749
1969
|
)
|
|
1750
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1970
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1751
1971
|
if g_param[OptionsDefine.Language]:
|
|
1752
1972
|
profile.language = g_param[OptionsDefine.Language]
|
|
1753
1973
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1777,6 +1997,61 @@ def doDescribeTopicSubscribeGroup(args, parsed_globals):
|
|
|
1777
1997
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1778
1998
|
|
|
1779
1999
|
|
|
2000
|
+
def doModifyRoutineMaintenanceTask(args, parsed_globals):
|
|
2001
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2002
|
+
|
|
2003
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2004
|
+
cred = credential.CVMRoleCredential()
|
|
2005
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2006
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2007
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2008
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2009
|
+
)
|
|
2010
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2011
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2012
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2013
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2014
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2015
|
+
else:
|
|
2016
|
+
cred = credential.Credential(
|
|
2017
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2018
|
+
)
|
|
2019
|
+
http_profile = HttpProfile(
|
|
2020
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2021
|
+
reqMethod="POST",
|
|
2022
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2023
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2024
|
+
)
|
|
2025
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2026
|
+
if g_param[OptionsDefine.Language]:
|
|
2027
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2028
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2029
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2030
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2031
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2032
|
+
model = models.ModifyRoutineMaintenanceTaskRequest()
|
|
2033
|
+
model.from_json_string(json.dumps(args))
|
|
2034
|
+
start_time = time.time()
|
|
2035
|
+
while True:
|
|
2036
|
+
rsp = client.ModifyRoutineMaintenanceTask(model)
|
|
2037
|
+
result = rsp.to_json_string()
|
|
2038
|
+
try:
|
|
2039
|
+
json_obj = json.loads(result)
|
|
2040
|
+
except TypeError as e:
|
|
2041
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2042
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2043
|
+
break
|
|
2044
|
+
cur_time = time.time()
|
|
2045
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2046
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2047
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2048
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2049
|
+
else:
|
|
2050
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2051
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2052
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2053
|
+
|
|
2054
|
+
|
|
1780
2055
|
def doDeleteRouteTriggerTime(args, parsed_globals):
|
|
1781
2056
|
g_param = parse_global_arg(parsed_globals)
|
|
1782
2057
|
|
|
@@ -1802,7 +2077,7 @@ def doDeleteRouteTriggerTime(args, parsed_globals):
|
|
|
1802
2077
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1803
2078
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1804
2079
|
)
|
|
1805
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2080
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1806
2081
|
if g_param[OptionsDefine.Language]:
|
|
1807
2082
|
profile.language = g_param[OptionsDefine.Language]
|
|
1808
2083
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1857,7 +2132,7 @@ def doCreatePartition(args, parsed_globals):
|
|
|
1857
2132
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1858
2133
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1859
2134
|
)
|
|
1860
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2135
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1861
2136
|
if g_param[OptionsDefine.Language]:
|
|
1862
2137
|
profile.language = g_param[OptionsDefine.Language]
|
|
1863
2138
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1912,7 +2187,7 @@ def doCreateUser(args, parsed_globals):
|
|
|
1912
2187
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1913
2188
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1914
2189
|
)
|
|
1915
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2190
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1916
2191
|
if g_param[OptionsDefine.Language]:
|
|
1917
2192
|
profile.language = g_param[OptionsDefine.Language]
|
|
1918
2193
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1967,7 +2242,7 @@ def doDescribeTaskStatus(args, parsed_globals):
|
|
|
1967
2242
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1968
2243
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1969
2244
|
)
|
|
1970
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2245
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1971
2246
|
if g_param[OptionsDefine.Language]:
|
|
1972
2247
|
profile.language = g_param[OptionsDefine.Language]
|
|
1973
2248
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2022,7 +2297,7 @@ def doBatchModifyGroupOffsets(args, parsed_globals):
|
|
|
2022
2297
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2023
2298
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2024
2299
|
)
|
|
2025
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2300
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2026
2301
|
if g_param[OptionsDefine.Language]:
|
|
2027
2302
|
profile.language = g_param[OptionsDefine.Language]
|
|
2028
2303
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2077,7 +2352,7 @@ def doDeleteAcl(args, parsed_globals):
|
|
|
2077
2352
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2078
2353
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2079
2354
|
)
|
|
2080
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2355
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2081
2356
|
if g_param[OptionsDefine.Language]:
|
|
2082
2357
|
profile.language = g_param[OptionsDefine.Language]
|
|
2083
2358
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2107,7 +2382,62 @@ def doDeleteAcl(args, parsed_globals):
|
|
|
2107
2382
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2108
2383
|
|
|
2109
2384
|
|
|
2110
|
-
def
|
|
2385
|
+
def doInstanceScalingDown(args, parsed_globals):
|
|
2386
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2387
|
+
|
|
2388
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2389
|
+
cred = credential.CVMRoleCredential()
|
|
2390
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2391
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2392
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2393
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2394
|
+
)
|
|
2395
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2396
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2397
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2398
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2399
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2400
|
+
else:
|
|
2401
|
+
cred = credential.Credential(
|
|
2402
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2403
|
+
)
|
|
2404
|
+
http_profile = HttpProfile(
|
|
2405
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2406
|
+
reqMethod="POST",
|
|
2407
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2408
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2409
|
+
)
|
|
2410
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2411
|
+
if g_param[OptionsDefine.Language]:
|
|
2412
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2413
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2414
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2415
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2416
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2417
|
+
model = models.InstanceScalingDownRequest()
|
|
2418
|
+
model.from_json_string(json.dumps(args))
|
|
2419
|
+
start_time = time.time()
|
|
2420
|
+
while True:
|
|
2421
|
+
rsp = client.InstanceScalingDown(model)
|
|
2422
|
+
result = rsp.to_json_string()
|
|
2423
|
+
try:
|
|
2424
|
+
json_obj = json.loads(result)
|
|
2425
|
+
except TypeError as e:
|
|
2426
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2427
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2428
|
+
break
|
|
2429
|
+
cur_time = time.time()
|
|
2430
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2431
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2432
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2433
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2434
|
+
else:
|
|
2435
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2436
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2437
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2438
|
+
|
|
2439
|
+
|
|
2440
|
+
def doDeleteTopic(args, parsed_globals):
|
|
2111
2441
|
g_param = parse_global_arg(parsed_globals)
|
|
2112
2442
|
|
|
2113
2443
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2132,18 +2462,18 @@ def doDescribeAppInfo(args, parsed_globals):
|
|
|
2132
2462
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2133
2463
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2134
2464
|
)
|
|
2135
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2465
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2136
2466
|
if g_param[OptionsDefine.Language]:
|
|
2137
2467
|
profile.language = g_param[OptionsDefine.Language]
|
|
2138
2468
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2139
2469
|
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2140
2470
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2141
2471
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2142
|
-
model = models.
|
|
2472
|
+
model = models.DeleteTopicRequest()
|
|
2143
2473
|
model.from_json_string(json.dumps(args))
|
|
2144
2474
|
start_time = time.time()
|
|
2145
2475
|
while True:
|
|
2146
|
-
rsp = client.
|
|
2476
|
+
rsp = client.DeleteTopic(model)
|
|
2147
2477
|
result = rsp.to_json_string()
|
|
2148
2478
|
try:
|
|
2149
2479
|
json_obj = json.loads(result)
|
|
@@ -2187,7 +2517,7 @@ def doDescribeGroupOffsets(args, parsed_globals):
|
|
|
2187
2517
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2188
2518
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2189
2519
|
)
|
|
2190
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2520
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2191
2521
|
if g_param[OptionsDefine.Language]:
|
|
2192
2522
|
profile.language = g_param[OptionsDefine.Language]
|
|
2193
2523
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2242,7 +2572,7 @@ def doDeleteInstancePre(args, parsed_globals):
|
|
|
2242
2572
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2243
2573
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2244
2574
|
)
|
|
2245
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2575
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2246
2576
|
if g_param[OptionsDefine.Language]:
|
|
2247
2577
|
profile.language = g_param[OptionsDefine.Language]
|
|
2248
2578
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2297,7 +2627,7 @@ def doDescribeInstanceAttributes(args, parsed_globals):
|
|
|
2297
2627
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2298
2628
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2299
2629
|
)
|
|
2300
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2630
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2301
2631
|
if g_param[OptionsDefine.Language]:
|
|
2302
2632
|
profile.language = g_param[OptionsDefine.Language]
|
|
2303
2633
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2352,7 +2682,7 @@ def doDescribeInstancesDetail(args, parsed_globals):
|
|
|
2352
2682
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2353
2683
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2354
2684
|
)
|
|
2355
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2685
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2356
2686
|
if g_param[OptionsDefine.Language]:
|
|
2357
2687
|
profile.language = g_param[OptionsDefine.Language]
|
|
2358
2688
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2407,7 +2737,7 @@ def doBatchCreateAcl(args, parsed_globals):
|
|
|
2407
2737
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2408
2738
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2409
2739
|
)
|
|
2410
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2740
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2411
2741
|
if g_param[OptionsDefine.Language]:
|
|
2412
2742
|
profile.language = g_param[OptionsDefine.Language]
|
|
2413
2743
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2437,6 +2767,61 @@ def doBatchCreateAcl(args, parsed_globals):
|
|
|
2437
2767
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2438
2768
|
|
|
2439
2769
|
|
|
2770
|
+
def doDeleteAclRule(args, parsed_globals):
|
|
2771
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2772
|
+
|
|
2773
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2774
|
+
cred = credential.CVMRoleCredential()
|
|
2775
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2776
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2777
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2778
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2779
|
+
)
|
|
2780
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2781
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2782
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2783
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2784
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2785
|
+
else:
|
|
2786
|
+
cred = credential.Credential(
|
|
2787
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2788
|
+
)
|
|
2789
|
+
http_profile = HttpProfile(
|
|
2790
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2791
|
+
reqMethod="POST",
|
|
2792
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2793
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2794
|
+
)
|
|
2795
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2796
|
+
if g_param[OptionsDefine.Language]:
|
|
2797
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2798
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2799
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2800
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2801
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2802
|
+
model = models.DeleteAclRuleRequest()
|
|
2803
|
+
model.from_json_string(json.dumps(args))
|
|
2804
|
+
start_time = time.time()
|
|
2805
|
+
while True:
|
|
2806
|
+
rsp = client.DeleteAclRule(model)
|
|
2807
|
+
result = rsp.to_json_string()
|
|
2808
|
+
try:
|
|
2809
|
+
json_obj = json.loads(result)
|
|
2810
|
+
except TypeError as e:
|
|
2811
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2812
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2813
|
+
break
|
|
2814
|
+
cur_time = time.time()
|
|
2815
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2816
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2817
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2818
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2819
|
+
else:
|
|
2820
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2821
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2822
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2823
|
+
|
|
2824
|
+
|
|
2440
2825
|
def doModifyAclRule(args, parsed_globals):
|
|
2441
2826
|
g_param = parse_global_arg(parsed_globals)
|
|
2442
2827
|
|
|
@@ -2462,7 +2847,7 @@ def doModifyAclRule(args, parsed_globals):
|
|
|
2462
2847
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2463
2848
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2464
2849
|
)
|
|
2465
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2850
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2466
2851
|
if g_param[OptionsDefine.Language]:
|
|
2467
2852
|
profile.language = g_param[OptionsDefine.Language]
|
|
2468
2853
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2517,7 +2902,7 @@ def doDeleteUser(args, parsed_globals):
|
|
|
2517
2902
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2518
2903
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2519
2904
|
)
|
|
2520
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2905
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2521
2906
|
if g_param[OptionsDefine.Language]:
|
|
2522
2907
|
profile.language = g_param[OptionsDefine.Language]
|
|
2523
2908
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2572,7 +2957,7 @@ def doDescribeTopicSyncReplica(args, parsed_globals):
|
|
|
2572
2957
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2573
2958
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2574
2959
|
)
|
|
2575
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2960
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2576
2961
|
if g_param[OptionsDefine.Language]:
|
|
2577
2962
|
profile.language = g_param[OptionsDefine.Language]
|
|
2578
2963
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2627,7 +3012,7 @@ def doDescribeTopicAttributes(args, parsed_globals):
|
|
|
2627
3012
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2628
3013
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2629
3014
|
)
|
|
2630
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3015
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2631
3016
|
if g_param[OptionsDefine.Language]:
|
|
2632
3017
|
profile.language = g_param[OptionsDefine.Language]
|
|
2633
3018
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2682,7 +3067,7 @@ def doFetchMessageListByTimestamp(args, parsed_globals):
|
|
|
2682
3067
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2683
3068
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2684
3069
|
)
|
|
2685
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3070
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2686
3071
|
if g_param[OptionsDefine.Language]:
|
|
2687
3072
|
profile.language = g_param[OptionsDefine.Language]
|
|
2688
3073
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2737,7 +3122,7 @@ def doDescribeTopicProduceConnection(args, parsed_globals):
|
|
|
2737
3122
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2738
3123
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2739
3124
|
)
|
|
2740
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3125
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2741
3126
|
if g_param[OptionsDefine.Language]:
|
|
2742
3127
|
profile.language = g_param[OptionsDefine.Language]
|
|
2743
3128
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2792,7 +3177,7 @@ def doCreatePostPaidInstance(args, parsed_globals):
|
|
|
2792
3177
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2793
3178
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2794
3179
|
)
|
|
2795
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3180
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2796
3181
|
if g_param[OptionsDefine.Language]:
|
|
2797
3182
|
profile.language = g_param[OptionsDefine.Language]
|
|
2798
3183
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2847,7 +3232,7 @@ def doCreateAclRule(args, parsed_globals):
|
|
|
2847
3232
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2848
3233
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2849
3234
|
)
|
|
2850
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3235
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2851
3236
|
if g_param[OptionsDefine.Language]:
|
|
2852
3237
|
profile.language = g_param[OptionsDefine.Language]
|
|
2853
3238
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2902,7 +3287,7 @@ def doModifyInstanceAttributes(args, parsed_globals):
|
|
|
2902
3287
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2903
3288
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2904
3289
|
)
|
|
2905
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3290
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2906
3291
|
if g_param[OptionsDefine.Language]:
|
|
2907
3292
|
profile.language = g_param[OptionsDefine.Language]
|
|
2908
3293
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2957,7 +3342,7 @@ def doDescribeCkafkaZone(args, parsed_globals):
|
|
|
2957
3342
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2958
3343
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2959
3344
|
)
|
|
2960
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3345
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2961
3346
|
if g_param[OptionsDefine.Language]:
|
|
2962
3347
|
profile.language = g_param[OptionsDefine.Language]
|
|
2963
3348
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -3012,7 +3397,7 @@ def doDescribeRegion(args, parsed_globals):
|
|
|
3012
3397
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3013
3398
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3014
3399
|
)
|
|
3015
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3400
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3016
3401
|
if g_param[OptionsDefine.Language]:
|
|
3017
3402
|
profile.language = g_param[OptionsDefine.Language]
|
|
3018
3403
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -3042,7 +3427,7 @@ def doDescribeRegion(args, parsed_globals):
|
|
|
3042
3427
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3043
3428
|
|
|
3044
3429
|
|
|
3045
|
-
def
|
|
3430
|
+
def doDescribeModifyType(args, parsed_globals):
|
|
3046
3431
|
g_param = parse_global_arg(parsed_globals)
|
|
3047
3432
|
|
|
3048
3433
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3067,18 +3452,18 @@ def doDescribeTopic(args, parsed_globals):
|
|
|
3067
3452
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3068
3453
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3069
3454
|
)
|
|
3070
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3455
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3071
3456
|
if g_param[OptionsDefine.Language]:
|
|
3072
3457
|
profile.language = g_param[OptionsDefine.Language]
|
|
3073
3458
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3074
3459
|
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3075
3460
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3076
3461
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3077
|
-
model = models.
|
|
3462
|
+
model = models.DescribeModifyTypeRequest()
|
|
3078
3463
|
model.from_json_string(json.dumps(args))
|
|
3079
3464
|
start_time = time.time()
|
|
3080
3465
|
while True:
|
|
3081
|
-
rsp = client.
|
|
3466
|
+
rsp = client.DescribeModifyType(model)
|
|
3082
3467
|
result = rsp.to_json_string()
|
|
3083
3468
|
try:
|
|
3084
3469
|
json_obj = json.loads(result)
|
|
@@ -3122,7 +3507,7 @@ def doModifyInstancePre(args, parsed_globals):
|
|
|
3122
3507
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3123
3508
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3124
3509
|
)
|
|
3125
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3510
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3126
3511
|
if g_param[OptionsDefine.Language]:
|
|
3127
3512
|
profile.language = g_param[OptionsDefine.Language]
|
|
3128
3513
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -3152,7 +3537,7 @@ def doModifyInstancePre(args, parsed_globals):
|
|
|
3152
3537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3153
3538
|
|
|
3154
3539
|
|
|
3155
|
-
def
|
|
3540
|
+
def doDescribeTopic(args, parsed_globals):
|
|
3156
3541
|
g_param = parse_global_arg(parsed_globals)
|
|
3157
3542
|
|
|
3158
3543
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3177,18 +3562,18 @@ def doDeleteTopic(args, parsed_globals):
|
|
|
3177
3562
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3178
3563
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3179
3564
|
)
|
|
3180
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3565
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3181
3566
|
if g_param[OptionsDefine.Language]:
|
|
3182
3567
|
profile.language = g_param[OptionsDefine.Language]
|
|
3183
3568
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3184
3569
|
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3185
3570
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3186
3571
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3187
|
-
model = models.
|
|
3572
|
+
model = models.DescribeTopicRequest()
|
|
3188
3573
|
model.from_json_string(json.dumps(args))
|
|
3189
3574
|
start_time = time.time()
|
|
3190
3575
|
while True:
|
|
3191
|
-
rsp = client.
|
|
3576
|
+
rsp = client.DescribeTopic(model)
|
|
3192
3577
|
result = rsp.to_json_string()
|
|
3193
3578
|
try:
|
|
3194
3579
|
json_obj = json.loads(result)
|
|
@@ -3232,7 +3617,7 @@ def doInquireCkafkaPrice(args, parsed_globals):
|
|
|
3232
3617
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3233
3618
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3234
3619
|
)
|
|
3235
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3620
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3236
3621
|
if g_param[OptionsDefine.Language]:
|
|
3237
3622
|
profile.language = g_param[OptionsDefine.Language]
|
|
3238
3623
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -3287,7 +3672,7 @@ def doModifyTopicAttributes(args, parsed_globals):
|
|
|
3287
3672
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3288
3673
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3289
3674
|
)
|
|
3290
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
3675
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3291
3676
|
if g_param[OptionsDefine.Language]:
|
|
3292
3677
|
profile.language = g_param[OptionsDefine.Language]
|
|
3293
3678
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -3341,13 +3726,17 @@ ACTION_MAP = {
|
|
|
3341
3726
|
"DeleteRoute": doDeleteRoute,
|
|
3342
3727
|
"SendMessage": doSendMessage,
|
|
3343
3728
|
"DescribeUser": doDescribeUser,
|
|
3344
|
-
"CreateTopicIpWhiteList": doCreateTopicIpWhiteList,
|
|
3345
3729
|
"DescribeGroup": doDescribeGroup,
|
|
3730
|
+
"CreateTopicIpWhiteList": doCreateTopicIpWhiteList,
|
|
3731
|
+
"DescribeCkafkaVersion": doDescribeCkafkaVersion,
|
|
3346
3732
|
"ModifyGroupOffsets": doModifyGroupOffsets,
|
|
3733
|
+
"UpgradeBrokerVersion": doUpgradeBrokerVersion,
|
|
3347
3734
|
"DescribeInstances": doDescribeInstances,
|
|
3348
3735
|
"DescribeCvmInfo": doDescribeCvmInfo,
|
|
3349
3736
|
"DescribeDatahubTopic": doDescribeDatahubTopic,
|
|
3350
3737
|
"CreateRoute": doCreateRoute,
|
|
3738
|
+
"DeleteGroupSubscribeTopic": doDeleteGroupSubscribeTopic,
|
|
3739
|
+
"DeleteGroup": doDeleteGroup,
|
|
3351
3740
|
"ModifyDatahubTopic": doModifyDatahubTopic,
|
|
3352
3741
|
"FetchMessageListByOffset": doFetchMessageListByOffset,
|
|
3353
3742
|
"CreateDatahubTopic": doCreateDatahubTopic,
|
|
@@ -3360,18 +3749,21 @@ ACTION_MAP = {
|
|
|
3360
3749
|
"ModifyPassword": doModifyPassword,
|
|
3361
3750
|
"DescribeConsumerGroup": doDescribeConsumerGroup,
|
|
3362
3751
|
"DescribeTopicSubscribeGroup": doDescribeTopicSubscribeGroup,
|
|
3752
|
+
"ModifyRoutineMaintenanceTask": doModifyRoutineMaintenanceTask,
|
|
3363
3753
|
"DeleteRouteTriggerTime": doDeleteRouteTriggerTime,
|
|
3364
3754
|
"CreatePartition": doCreatePartition,
|
|
3365
3755
|
"CreateUser": doCreateUser,
|
|
3366
3756
|
"DescribeTaskStatus": doDescribeTaskStatus,
|
|
3367
3757
|
"BatchModifyGroupOffsets": doBatchModifyGroupOffsets,
|
|
3368
3758
|
"DeleteAcl": doDeleteAcl,
|
|
3369
|
-
"
|
|
3759
|
+
"InstanceScalingDown": doInstanceScalingDown,
|
|
3760
|
+
"DeleteTopic": doDeleteTopic,
|
|
3370
3761
|
"DescribeGroupOffsets": doDescribeGroupOffsets,
|
|
3371
3762
|
"DeleteInstancePre": doDeleteInstancePre,
|
|
3372
3763
|
"DescribeInstanceAttributes": doDescribeInstanceAttributes,
|
|
3373
3764
|
"DescribeInstancesDetail": doDescribeInstancesDetail,
|
|
3374
3765
|
"BatchCreateAcl": doBatchCreateAcl,
|
|
3766
|
+
"DeleteAclRule": doDeleteAclRule,
|
|
3375
3767
|
"ModifyAclRule": doModifyAclRule,
|
|
3376
3768
|
"DeleteUser": doDeleteUser,
|
|
3377
3769
|
"DescribeTopicSyncReplica": doDescribeTopicSyncReplica,
|
|
@@ -3383,9 +3775,9 @@ ACTION_MAP = {
|
|
|
3383
3775
|
"ModifyInstanceAttributes": doModifyInstanceAttributes,
|
|
3384
3776
|
"DescribeCkafkaZone": doDescribeCkafkaZone,
|
|
3385
3777
|
"DescribeRegion": doDescribeRegion,
|
|
3386
|
-
"
|
|
3778
|
+
"DescribeModifyType": doDescribeModifyType,
|
|
3387
3779
|
"ModifyInstancePre": doModifyInstancePre,
|
|
3388
|
-
"
|
|
3780
|
+
"DescribeTopic": doDescribeTopic,
|
|
3389
3781
|
"InquireCkafkaPrice": doInquireCkafkaPrice,
|
|
3390
3782
|
"ModifyTopicAttributes": doModifyTopicAttributes,
|
|
3391
3783
|
|