tccli 3.0.1208.1__py2.py3-none-any.whl → 3.0.1209.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +3 -0
- tccli/services/batch/v20170312/api.json +20 -2
- tccli/services/bma/v20221115/examples.json +1 -1
- tccli/services/ccc/v20200210/api.json +28 -1
- tccli/services/cls/cls_client.py +216 -4
- tccli/services/cls/v20201016/api.json +425 -0
- tccli/services/cls/v20201016/examples.json +32 -0
- tccli/services/cynosdb/v20190107/api.json +11 -0
- tccli/services/dc/dc_client.py +126 -73
- tccli/services/dc/v20180410/api.json +300 -0
- tccli/services/dc/v20180410/examples.json +8 -0
- tccli/services/emr/v20190103/api.json +1 -1
- tccli/services/ess/v20201111/api.json +2 -2
- tccli/services/ess/v20201111/examples.json +8 -8
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/faceid/v20180301/api.json +10 -0
- tccli/services/gwlb/__init__.py +4 -0
- tccli/services/gwlb/gwlb_client.py +1096 -0
- tccli/services/gwlb/v20240906/api.json +1807 -0
- tccli/services/gwlb/v20240906/examples.json +155 -0
- tccli/services/oceanus/v20190422/api.json +4 -4
- tccli/services/privatedns/privatedns_client.py +57 -4
- tccli/services/privatedns/v20201028/api.json +101 -0
- tccli/services/privatedns/v20201028/examples.json +8 -0
- tccli/services/teo/v20220901/api.json +4 -4
- tccli/services/tke/v20180525/api.json +2 -2
- tccli/services/vclm/v20240523/api.json +9 -0
- tccli/services/vtc/v20240223/api.json +9 -0
- {tccli-3.0.1208.1.dist-info → tccli-3.0.1209.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1208.1.dist-info → tccli-3.0.1209.1.dist-info}/RECORD +34 -30
- {tccli-3.0.1208.1.dist-info → tccli-3.0.1209.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1208.1.dist-info → tccli-3.0.1209.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1208.1.dist-info → tccli-3.0.1209.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1209.1'
|
tccli/services/__init__.py
CHANGED
@@ -5391,6 +5391,7 @@
|
|
5391
5391
|
"example": "无",
|
5392
5392
|
"member": "Application",
|
5393
5393
|
"name": "Application",
|
5394
|
+
"output_required": true,
|
5394
5395
|
"required": true,
|
5395
5396
|
"type": "object",
|
5396
5397
|
"value_allowed_null": false
|
@@ -5401,16 +5402,18 @@
|
|
5401
5402
|
"example": "test-task",
|
5402
5403
|
"member": "string",
|
5403
5404
|
"name": "TaskName",
|
5405
|
+
"output_required": true,
|
5404
5406
|
"required": false,
|
5405
5407
|
"type": "string",
|
5406
5408
|
"value_allowed_null": false
|
5407
5409
|
},
|
5408
5410
|
{
|
5409
5411
|
"disabled": false,
|
5410
|
-
"document": "
|
5412
|
+
"document": "任务实例运行个数,默认为1",
|
5411
5413
|
"example": "1",
|
5412
5414
|
"member": "uint64",
|
5413
5415
|
"name": "TaskInstanceNum",
|
5416
|
+
"output_required": true,
|
5414
5417
|
"required": false,
|
5415
5418
|
"type": "int",
|
5416
5419
|
"value_allowed_null": false
|
@@ -5421,6 +5424,7 @@
|
|
5421
5424
|
"example": "无",
|
5422
5425
|
"member": "AnonymousComputeEnv",
|
5423
5426
|
"name": "ComputeEnv",
|
5427
|
+
"output_required": true,
|
5424
5428
|
"required": false,
|
5425
5429
|
"type": "object",
|
5426
5430
|
"value_allowed_null": false
|
@@ -5431,6 +5435,7 @@
|
|
5431
5435
|
"example": "env_238swek2",
|
5432
5436
|
"member": "string",
|
5433
5437
|
"name": "EnvId",
|
5438
|
+
"output_required": true,
|
5434
5439
|
"required": false,
|
5435
5440
|
"type": "string",
|
5436
5441
|
"value_allowed_null": false
|
@@ -5441,6 +5446,7 @@
|
|
5441
5446
|
"example": "无",
|
5442
5447
|
"member": "RedirectInfo",
|
5443
5448
|
"name": "RedirectInfo",
|
5449
|
+
"output_required": true,
|
5444
5450
|
"required": false,
|
5445
5451
|
"type": "object",
|
5446
5452
|
"value_allowed_null": false
|
@@ -5451,6 +5457,7 @@
|
|
5451
5457
|
"example": "无",
|
5452
5458
|
"member": "RedirectLocalInfo",
|
5453
5459
|
"name": "RedirectLocalInfo",
|
5460
|
+
"output_required": true,
|
5454
5461
|
"required": false,
|
5455
5462
|
"type": "object",
|
5456
5463
|
"value_allowed_null": false
|
@@ -5461,6 +5468,7 @@
|
|
5461
5468
|
"example": "无",
|
5462
5469
|
"member": "InputMapping",
|
5463
5470
|
"name": "InputMappings",
|
5471
|
+
"output_required": true,
|
5464
5472
|
"required": false,
|
5465
5473
|
"type": "list",
|
5466
5474
|
"value_allowed_null": false
|
@@ -5471,6 +5479,7 @@
|
|
5471
5479
|
"example": "无",
|
5472
5480
|
"member": "OutputMapping",
|
5473
5481
|
"name": "OutputMappings",
|
5482
|
+
"output_required": true,
|
5474
5483
|
"required": false,
|
5475
5484
|
"type": "list",
|
5476
5485
|
"value_allowed_null": false
|
@@ -5481,6 +5490,7 @@
|
|
5481
5490
|
"example": "无",
|
5482
5491
|
"member": "OutputMappingConfig",
|
5483
5492
|
"name": "OutputMappingConfigs",
|
5493
|
+
"output_required": true,
|
5484
5494
|
"required": false,
|
5485
5495
|
"type": "list",
|
5486
5496
|
"value_allowed_null": false
|
@@ -5491,6 +5501,7 @@
|
|
5491
5501
|
"example": "无",
|
5492
5502
|
"member": "EnvVar",
|
5493
5503
|
"name": "EnvVars",
|
5504
|
+
"output_required": true,
|
5494
5505
|
"required": false,
|
5495
5506
|
"type": "list",
|
5496
5507
|
"value_allowed_null": false
|
@@ -5501,6 +5512,7 @@
|
|
5501
5512
|
"example": "无",
|
5502
5513
|
"member": "Authentication",
|
5503
5514
|
"name": "Authentications",
|
5515
|
+
"output_required": true,
|
5504
5516
|
"required": false,
|
5505
5517
|
"type": "list",
|
5506
5518
|
"value_allowed_null": false
|
@@ -5511,6 +5523,7 @@
|
|
5511
5523
|
"example": "TERMINATE",
|
5512
5524
|
"member": "string",
|
5513
5525
|
"name": "FailedAction",
|
5526
|
+
"output_required": true,
|
5514
5527
|
"required": false,
|
5515
5528
|
"type": "string",
|
5516
5529
|
"value_allowed_null": false
|
@@ -5521,6 +5534,7 @@
|
|
5521
5534
|
"example": "0",
|
5522
5535
|
"member": "uint64",
|
5523
5536
|
"name": "MaxRetryCount",
|
5537
|
+
"output_required": true,
|
5524
5538
|
"required": false,
|
5525
5539
|
"type": "int",
|
5526
5540
|
"value_allowed_null": false
|
@@ -5531,6 +5545,7 @@
|
|
5531
5545
|
"example": "86400",
|
5532
5546
|
"member": "uint64",
|
5533
5547
|
"name": "Timeout",
|
5548
|
+
"output_required": true,
|
5534
5549
|
"required": false,
|
5535
5550
|
"type": "int",
|
5536
5551
|
"value_allowed_null": false
|
@@ -5541,6 +5556,7 @@
|
|
5541
5556
|
"example": "100",
|
5542
5557
|
"member": "uint64",
|
5543
5558
|
"name": "MaxConcurrentNum",
|
5559
|
+
"output_required": true,
|
5544
5560
|
"required": false,
|
5545
5561
|
"type": "int",
|
5546
5562
|
"value_allowed_null": false
|
@@ -5551,16 +5567,18 @@
|
|
5551
5567
|
"example": "false",
|
5552
5568
|
"member": "bool",
|
5553
5569
|
"name": "RestartComputeNode",
|
5570
|
+
"output_required": true,
|
5554
5571
|
"required": false,
|
5555
5572
|
"type": "bool",
|
5556
5573
|
"value_allowed_null": false
|
5557
5574
|
},
|
5558
5575
|
{
|
5559
5576
|
"disabled": false,
|
5560
|
-
"document": "启动任务过程中,创建计算资源如CVM失败后的最大重试次数,默认为0。最大值100
|
5577
|
+
"document": "启动任务过程中,创建计算资源如CVM失败后的最大重试次数,默认为0。最大值100。\n计算资源创建重试的等待时间间隔策略设置如下:\n[1, 3]: 等待600 s发起重试;\n[4, 10]: 等待900 s发起重试;\n[11, 50]: 等待1800 s发起重试;\n[51, 100]: 等待3600 s发起重试;\n[a, b]表示重试次数区间,每次重试的等待时间随着重试次数的增加而递增。\n例如,计算资源创建重试8次的耗时为:3*600 + 5*900 = 6300 s",
|
5561
5578
|
"example": "1",
|
5562
5579
|
"member": "uint64",
|
5563
5580
|
"name": "ResourceMaxRetryCount",
|
5581
|
+
"output_required": true,
|
5564
5582
|
"required": false,
|
5565
5583
|
"type": "int",
|
5566
5584
|
"value_allowed_null": false
|
@@ -51,7 +51,7 @@
|
|
51
51
|
"DeleteBPWhiteList": [
|
52
52
|
{
|
53
53
|
"document": "删除白名单",
|
54
|
-
"input": "{\n
|
54
|
+
"input": "POST / HTTP/1.1\nHost: bma.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteBPWhiteList\n<公共请求参数>\n\n{\n \"WhiteListId\": 123\n}",
|
55
55
|
"output": "{\n \"Response\": {\n \"RequestId\": \"xxx\"\n }\n}",
|
56
56
|
"title": "删除白名单"
|
57
57
|
}
|
@@ -1516,7 +1516,7 @@
|
|
1516
1516
|
"example": "ZhiMei",
|
1517
1517
|
"member": "string",
|
1518
1518
|
"name": "VoiceType",
|
1519
|
-
"required":
|
1519
|
+
"required": false,
|
1520
1520
|
"type": "string"
|
1521
1521
|
},
|
1522
1522
|
{
|
@@ -1599,6 +1599,33 @@
|
|
1599
1599
|
"name": "EndFunctionDesc",
|
1600
1600
|
"required": false,
|
1601
1601
|
"type": "string"
|
1602
|
+
},
|
1603
|
+
{
|
1604
|
+
"disabled": false,
|
1605
|
+
"document": "用户多久没说话提示时长,最小10秒,默认10秒",
|
1606
|
+
"example": "10000",
|
1607
|
+
"member": "int64",
|
1608
|
+
"name": "NotifyDuration",
|
1609
|
+
"required": false,
|
1610
|
+
"type": "int"
|
1611
|
+
},
|
1612
|
+
{
|
1613
|
+
"disabled": false,
|
1614
|
+
"document": "用户NotifyDuration没说话,ai提示的语句,默认是\"抱歉,我没听清。您可以重复下吗?\"",
|
1615
|
+
"example": "抱歉,我没听清。您可以重复下吗?",
|
1616
|
+
"member": "string",
|
1617
|
+
"name": "NotifyMessage",
|
1618
|
+
"required": false,
|
1619
|
+
"type": "string"
|
1620
|
+
},
|
1621
|
+
{
|
1622
|
+
"disabled": false,
|
1623
|
+
"document": "和voiceType字段需要选填一个,这里是使用自己自定义的TTS,voiceType是系统内置的一些音色\n\ntencent TTS:\n{ \n \"TTSType\": \"tencent\", // String TTS类型, 目前支持\"tencent\" 和 “minixmax”, 其他的厂商支持中\n \"AppId\": \"您的应用ID\", // String 必填\n \"SecretId\": \"您的密钥ID\", // String 必填\n \"SecretKey\": \"您的密钥Key\", // String 必填\n \"VoiceType\": 101001, // Integer 必填,音色 ID,包括标准音色与精品音色,精品音色拟真度更高,价格不同于标准音色,请参见语音合成计费概述。完整的音色 ID 列表请参见语音合成音色列表。\n \"Speed\": 1.25, // Integer 非必填,语速,范围:[-2,6],分别对应不同语速: -2: 代表0.6倍 -1: 代表0.8倍 0: 代表1.0倍(默认) 1: 代表1.2倍 2: 代表1.5倍 6: 代表2.5倍 如果需要更细化的语速,可以保留小数点后 2 位,例如0.5/1.25/2.81等。 参数值与实际语速转换,可参考 语速转换\n \"Volume\": 5, // Integer 非必填,音量大小,范围:[0,10],分别对应11个等级的音量,默认值为0,代表正常音量。\n \"PrimaryLanguage\": 1, // Integer 可选 主要语言 1-中文(默认) 2-英文 3-日文\n \"FastVoiceType\": \"xxxx\" // 可选参数, 快速声音复刻的参数 \n }\n\n参考:https://cloud.tencent.com/document/product/1073/92668#55924b56-1a73-4663-a7a1-a8dd82d6e823 \n\nminimax TTS\n{\n \"TTSType\": \"minimax\", // String TTS类型, \n \"Model\": \"speech-01-turbo\",\n \"APIUrl\": \"https://api.minimax.chat/v1/t2a_v2\",\n \"APIKey\": \"eyxxxx\",\n \"GroupId\": \"181000000000000\",\n \"VoiceType\":\"female-tianmei-jingpin\",\n \"Speed\": 1.2\n}\n\n参考:https://platform.minimaxi.com/document/T2A%20V2?key=66719005a427f0c8a5701643 \n限频参考:https://platform.minimaxi.com/document/Rate%20limits?key=66b19417290299a26b234572 可能会导致回答卡顿\n\n\n\nvolcengine TTS\n{\n \"TTSType\": \"volcengine\", // 必填:String TTS类型\n \"AppId\" : \"xxxxxxxx\", // 必填:String 火山引擎分配的Appid\n \"Token\" : \"TY9d4sQXHxxxxxxx\", // 必填: String类型 火山引擎的访问token\n \"Speed\" : 1.0, // 可选参数 语速,默认为1.0\n \"Volume\": 1.0, // 可选参数, 音量大小, 默认为1.0\n \"Cluster\" : \"volcano_tts\", // 可选参数,业务集群, 默认是 volcano_tts\n \"VoiceType\" : \"zh_male_aojiaobazong_moon_bigtts\" // 音色类型, 默认为大模型语音合成的音色。 如果使用普通语音合成,则需要填写对应的音色类型。 音色类型填写错误会导致没有声音。\n}\n\n\n\n火山引擎音色类型参考:\nhttps://www.volcengine.com/docs/6561/162929 \n语音合成音色列表--语音技术-火山引擎\n大模型语音合成音色列表--语音技术-火山引擎\n\n\nAzure TTS\n{\n \"TTSType\": \"azure\", // 必填:String TTS类型\n \"SubscriptionKey\": \"xxxxxxxx\", // 必填:String 订阅的Key\n \"Region\": \"chinanorth3\", // 必填:String 订阅的地区\n \"VoiceName\": \"zh-CN-XiaoxiaoNeural\", // 必填:String 音色名必填\n \"Language\": \"zh-CN\", // 必填:String 合成的语言 \n \"Rate\": 1 // 选填:float 语速 0.5~2 默认为 1\n}\n\n参考:\nhttps://docs.azure.cn/zh-cn/ai-services/speech-service/speech-synthesis-markup-voice \n\n\n自定义 TTS \n{\n \"TTSType\": \"custom\", // String 必填\n \"APIKey\": \"ApiKey\", // String 必填 用来鉴权\n \"APIUrl\": \"http://0.0.0.0:8080/stream-audio\" // String,必填,TTS API URL\n \"AudioFormat\": \"wav\", // String, 非必填,期望输出的音频格式,如mp3, ogg_opus,pcm,wav,默认为 wav,目前只支持pcm和wav,\n \"SampleRate\": 16000, // Integer,非必填,音频采样率,默认为16000(16k),推荐值为16000\n \"AudioChannel\": 1, // Integer,非必填,音频通道数,取值:1 或 2 默认为1 \n}\n\n\n具体协议规范: \nhttps://doc.weixin.qq.com/doc/w3_ANQAiAbdAFwHILbJBmtSqSbV1WZ3L?scode=AJEAIQdfAAo5a1xajYANQAiAbdAFw \n\n\n",
|
1624
|
+
"example": "{ \t\"TTSType\": \"azure\", \t\"SubscriptionKey\": \"xxxxxxxx\", \t\"Region\": \"chinanorth3\", \t\"VoiceName\": \"zh-CN-XiaoxiaoNeural\", \t\"Language\": \"zh-CN\", \t\"Rate\": 1 }",
|
1625
|
+
"member": "string",
|
1626
|
+
"name": "CustomTTSConfig",
|
1627
|
+
"required": false,
|
1628
|
+
"type": "string"
|
1602
1629
|
}
|
1603
1630
|
],
|
1604
1631
|
"type": "object"
|
tccli/services/cls/cls_client.py
CHANGED
@@ -1525,7 +1525,7 @@ def doCreateShipper(args, parsed_globals):
|
|
1525
1525
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1526
1526
|
|
1527
1527
|
|
1528
|
-
def
|
1528
|
+
def doCreateNoticeContent(args, parsed_globals):
|
1529
1529
|
g_param = parse_global_arg(parsed_globals)
|
1530
1530
|
|
1531
1531
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1554,11 +1554,11 @@ def doModifyConsumer(args, parsed_globals):
|
|
1554
1554
|
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
1555
1555
|
client._sdkVersion += ("_CLI_" + __version__)
|
1556
1556
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1557
|
-
model = models.
|
1557
|
+
model = models.CreateNoticeContentRequest()
|
1558
1558
|
model.from_json_string(json.dumps(args))
|
1559
1559
|
start_time = time.time()
|
1560
1560
|
while True:
|
1561
|
-
rsp = client.
|
1561
|
+
rsp = client.CreateNoticeContent(model)
|
1562
1562
|
result = rsp.to_json_string()
|
1563
1563
|
try:
|
1564
1564
|
json_obj = json.loads(result)
|
@@ -2981,6 +2981,58 @@ def doDescribeShipperTasks(args, parsed_globals):
|
|
2981
2981
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2982
2982
|
|
2983
2983
|
|
2984
|
+
def doModifyNoticeContent(args, parsed_globals):
|
2985
|
+
g_param = parse_global_arg(parsed_globals)
|
2986
|
+
|
2987
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2988
|
+
cred = credential.CVMRoleCredential()
|
2989
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2990
|
+
cred = credential.STSAssumeRoleCredential(
|
2991
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2992
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2993
|
+
)
|
2994
|
+
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):
|
2995
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2996
|
+
else:
|
2997
|
+
cred = credential.Credential(
|
2998
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2999
|
+
)
|
3000
|
+
http_profile = HttpProfile(
|
3001
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3002
|
+
reqMethod="POST",
|
3003
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3004
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3005
|
+
)
|
3006
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3007
|
+
if g_param[OptionsDefine.Language]:
|
3008
|
+
profile.language = g_param[OptionsDefine.Language]
|
3009
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3010
|
+
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
3011
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3012
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3013
|
+
model = models.ModifyNoticeContentRequest()
|
3014
|
+
model.from_json_string(json.dumps(args))
|
3015
|
+
start_time = time.time()
|
3016
|
+
while True:
|
3017
|
+
rsp = client.ModifyNoticeContent(model)
|
3018
|
+
result = rsp.to_json_string()
|
3019
|
+
try:
|
3020
|
+
json_obj = json.loads(result)
|
3021
|
+
except TypeError as e:
|
3022
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3023
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3024
|
+
break
|
3025
|
+
cur_time = time.time()
|
3026
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3027
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3028
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3029
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3030
|
+
else:
|
3031
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3032
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3033
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3034
|
+
|
3035
|
+
|
2984
3036
|
def doSearchCosRechargeInfo(args, parsed_globals):
|
2985
3037
|
g_param = parse_global_arg(parsed_globals)
|
2986
3038
|
|
@@ -3293,6 +3345,58 @@ def doAddMachineGroupInfo(args, parsed_globals):
|
|
3293
3345
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3294
3346
|
|
3295
3347
|
|
3348
|
+
def doDeleteNoticeContent(args, parsed_globals):
|
3349
|
+
g_param = parse_global_arg(parsed_globals)
|
3350
|
+
|
3351
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3352
|
+
cred = credential.CVMRoleCredential()
|
3353
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3354
|
+
cred = credential.STSAssumeRoleCredential(
|
3355
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3356
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3357
|
+
)
|
3358
|
+
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):
|
3359
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3360
|
+
else:
|
3361
|
+
cred = credential.Credential(
|
3362
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3363
|
+
)
|
3364
|
+
http_profile = HttpProfile(
|
3365
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3366
|
+
reqMethod="POST",
|
3367
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3368
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3369
|
+
)
|
3370
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3371
|
+
if g_param[OptionsDefine.Language]:
|
3372
|
+
profile.language = g_param[OptionsDefine.Language]
|
3373
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3374
|
+
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
3375
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3376
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3377
|
+
model = models.DeleteNoticeContentRequest()
|
3378
|
+
model.from_json_string(json.dumps(args))
|
3379
|
+
start_time = time.time()
|
3380
|
+
while True:
|
3381
|
+
rsp = client.DeleteNoticeContent(model)
|
3382
|
+
result = rsp.to_json_string()
|
3383
|
+
try:
|
3384
|
+
json_obj = json.loads(result)
|
3385
|
+
except TypeError as e:
|
3386
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3387
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3388
|
+
break
|
3389
|
+
cur_time = time.time()
|
3390
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3391
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3392
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3393
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3394
|
+
else:
|
3395
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3396
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3397
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3398
|
+
|
3399
|
+
|
3296
3400
|
def doDeleteConsoleSharing(args, parsed_globals):
|
3297
3401
|
g_param = parse_global_arg(parsed_globals)
|
3298
3402
|
|
@@ -4860,6 +4964,58 @@ def doModifyLogset(args, parsed_globals):
|
|
4860
4964
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4861
4965
|
|
4862
4966
|
|
4967
|
+
def doModifyConsumer(args, parsed_globals):
|
4968
|
+
g_param = parse_global_arg(parsed_globals)
|
4969
|
+
|
4970
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4971
|
+
cred = credential.CVMRoleCredential()
|
4972
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4973
|
+
cred = credential.STSAssumeRoleCredential(
|
4974
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4975
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4976
|
+
)
|
4977
|
+
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):
|
4978
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4979
|
+
else:
|
4980
|
+
cred = credential.Credential(
|
4981
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4982
|
+
)
|
4983
|
+
http_profile = HttpProfile(
|
4984
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4985
|
+
reqMethod="POST",
|
4986
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4987
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4988
|
+
)
|
4989
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4990
|
+
if g_param[OptionsDefine.Language]:
|
4991
|
+
profile.language = g_param[OptionsDefine.Language]
|
4992
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4993
|
+
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
4994
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4995
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4996
|
+
model = models.ModifyConsumerRequest()
|
4997
|
+
model.from_json_string(json.dumps(args))
|
4998
|
+
start_time = time.time()
|
4999
|
+
while True:
|
5000
|
+
rsp = client.ModifyConsumer(model)
|
5001
|
+
result = rsp.to_json_string()
|
5002
|
+
try:
|
5003
|
+
json_obj = json.loads(result)
|
5004
|
+
except TypeError as e:
|
5005
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5006
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5007
|
+
break
|
5008
|
+
cur_time = time.time()
|
5009
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5010
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5011
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5012
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5013
|
+
else:
|
5014
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5015
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5016
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5017
|
+
|
5018
|
+
|
4863
5019
|
def doModifyDataTransform(args, parsed_globals):
|
4864
5020
|
g_param = parse_global_arg(parsed_globals)
|
4865
5021
|
|
@@ -5068,6 +5224,58 @@ def doDescribeConsumer(args, parsed_globals):
|
|
5068
5224
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5069
5225
|
|
5070
5226
|
|
5227
|
+
def doDescribeNoticeContents(args, parsed_globals):
|
5228
|
+
g_param = parse_global_arg(parsed_globals)
|
5229
|
+
|
5230
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5231
|
+
cred = credential.CVMRoleCredential()
|
5232
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5233
|
+
cred = credential.STSAssumeRoleCredential(
|
5234
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5235
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5236
|
+
)
|
5237
|
+
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):
|
5238
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5239
|
+
else:
|
5240
|
+
cred = credential.Credential(
|
5241
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5242
|
+
)
|
5243
|
+
http_profile = HttpProfile(
|
5244
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5245
|
+
reqMethod="POST",
|
5246
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5247
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5248
|
+
)
|
5249
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5250
|
+
if g_param[OptionsDefine.Language]:
|
5251
|
+
profile.language = g_param[OptionsDefine.Language]
|
5252
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5253
|
+
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
5254
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5255
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5256
|
+
model = models.DescribeNoticeContentsRequest()
|
5257
|
+
model.from_json_string(json.dumps(args))
|
5258
|
+
start_time = time.time()
|
5259
|
+
while True:
|
5260
|
+
rsp = client.DescribeNoticeContents(model)
|
5261
|
+
result = rsp.to_json_string()
|
5262
|
+
try:
|
5263
|
+
json_obj = json.loads(result)
|
5264
|
+
except TypeError as e:
|
5265
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5266
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5267
|
+
break
|
5268
|
+
cur_time = time.time()
|
5269
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5270
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5271
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5272
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5273
|
+
else:
|
5274
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5275
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5276
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5277
|
+
|
5278
|
+
|
5071
5279
|
def doDescribeMachines(args, parsed_globals):
|
5072
5280
|
g_param = parse_global_arg(parsed_globals)
|
5073
5281
|
|
@@ -5316,7 +5524,7 @@ ACTION_MAP = {
|
|
5316
5524
|
"DescribeIndex": doDescribeIndex,
|
5317
5525
|
"CreateAlarmShield": doCreateAlarmShield,
|
5318
5526
|
"CreateShipper": doCreateShipper,
|
5319
|
-
"
|
5527
|
+
"CreateNoticeContent": doCreateNoticeContent,
|
5320
5528
|
"DeleteConsumer": doDeleteConsumer,
|
5321
5529
|
"DeleteMachineGroup": doDeleteMachineGroup,
|
5322
5530
|
"DescribeKafkaRecharges": doDescribeKafkaRecharges,
|
@@ -5344,12 +5552,14 @@ ACTION_MAP = {
|
|
5344
5552
|
"CreateConsoleSharing": doCreateConsoleSharing,
|
5345
5553
|
"DescribeMachineGroupConfigs": doDescribeMachineGroupConfigs,
|
5346
5554
|
"DescribeShipperTasks": doDescribeShipperTasks,
|
5555
|
+
"ModifyNoticeContent": doModifyNoticeContent,
|
5347
5556
|
"SearchCosRechargeInfo": doSearchCosRechargeInfo,
|
5348
5557
|
"ModifyKafkaRecharge": doModifyKafkaRecharge,
|
5349
5558
|
"DescribeKafkaConsumer": doDescribeKafkaConsumer,
|
5350
5559
|
"DeleteDashboardSubscribe": doDeleteDashboardSubscribe,
|
5351
5560
|
"CreateDataTransform": doCreateDataTransform,
|
5352
5561
|
"AddMachineGroupInfo": doAddMachineGroupInfo,
|
5562
|
+
"DeleteNoticeContent": doDeleteNoticeContent,
|
5353
5563
|
"DeleteConsoleSharing": doDeleteConsoleSharing,
|
5354
5564
|
"DescribeAlarmNotices": doDescribeAlarmNotices,
|
5355
5565
|
"DescribePartitions": doDescribePartitions,
|
@@ -5380,10 +5590,12 @@ ACTION_MAP = {
|
|
5380
5590
|
"UploadLog": doUploadLog,
|
5381
5591
|
"DeleteTopic": doDeleteTopic,
|
5382
5592
|
"ModifyLogset": doModifyLogset,
|
5593
|
+
"ModifyConsumer": doModifyConsumer,
|
5383
5594
|
"ModifyDataTransform": doModifyDataTransform,
|
5384
5595
|
"SearchLog": doSearchLog,
|
5385
5596
|
"DescribeLogContext": doDescribeLogContext,
|
5386
5597
|
"DescribeConsumer": doDescribeConsumer,
|
5598
|
+
"DescribeNoticeContents": doDescribeNoticeContents,
|
5387
5599
|
"DescribeMachines": doDescribeMachines,
|
5388
5600
|
"RetryShipperTask": doRetryShipperTask,
|
5389
5601
|
"CreateAlarm": doCreateAlarm,
|