tccli 3.0.1147.1__py2.py3-none-any.whl → 3.0.1149.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/aiart/aiart_client.py +53 -0
- tccli/services/aiart/v20221229/api.json +80 -0
- tccli/services/aiart/v20221229/examples.json +8 -0
- tccli/services/asr/v20190614/api.json +6 -6
- tccli/services/cam/v20190116/api.json +4 -4
- tccli/services/cam/v20190116/examples.json +1 -1
- tccli/services/clb/v20180317/api.json +1 -1
- tccli/services/cwp/v20180228/api.json +63 -16
- tccli/services/cwp/v20180228/examples.json +1 -1
- tccli/services/dcdb/v20180411/api.json +2 -0
- tccli/services/dnspod/v20210323/api.json +9 -0
- tccli/services/ess/ess_client.py +53 -0
- tccli/services/ess/v20201111/api.json +67 -5
- tccli/services/ess/v20201111/examples.json +14 -0
- tccli/services/essbasic/essbasic_client.py +57 -4
- tccli/services/essbasic/v20210526/api.json +56 -3
- tccli/services/essbasic/v20210526/examples.json +8 -0
- tccli/services/gaap/gaap_client.py +53 -0
- tccli/services/gaap/v20180529/api.json +24 -0
- tccli/services/gaap/v20180529/examples.json +8 -0
- tccli/services/lighthouse/v20200324/api.json +33 -31
- tccli/services/lighthouse/v20200324/examples.json +3 -3
- tccli/services/live/v20180801/api.json +6 -0
- tccli/services/live/v20180801/examples.json +1 -1
- tccli/services/lke/lke_client.py +53 -0
- tccli/services/lke/v20231130/api.json +160 -1
- tccli/services/lke/v20231130/examples.json +8 -0
- tccli/services/mariadb/mariadb_client.py +53 -0
- tccli/services/mariadb/v20170312/api.json +88 -0
- tccli/services/mariadb/v20170312/examples.json +8 -0
- tccli/services/mna/mna_client.py +485 -8
- tccli/services/mna/v20210119/api.json +743 -21
- tccli/services/mna/v20210119/examples.json +72 -0
- tccli/services/mongodb/v20190725/api.json +35 -35
- tccli/services/monitor/v20180724/api.json +1 -1
- tccli/services/mps/v20190612/api.json +31 -10
- tccli/services/oceanus/v20190422/api.json +24 -0
- tccli/services/organization/v20210331/api.json +1 -1
- tccli/services/rum/v20210622/api.json +9 -0
- tccli/services/tdmq/v20200217/api.json +12 -10
- tccli/services/tdmq/v20200217/examples.json +1 -1
- tccli/services/thpc/v20230321/api.json +11 -3
- tccli/services/tke/v20180525/api.json +3 -3
- tccli/services/trtc/v20190722/api.json +15 -5
- tccli/services/tsf/tsf_client.py +110 -4
- tccli/services/tsf/v20180326/api.json +142 -0
- tccli/services/tsf/v20180326/examples.json +16 -0
- tccli/services/vpc/v20170312/api.json +1 -1
- {tccli-3.0.1147.1.dist-info → tccli-3.0.1149.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1147.1.dist-info → tccli-3.0.1149.1.dist-info}/RECORD +54 -54
- {tccli-3.0.1147.1.dist-info → tccli-3.0.1149.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1147.1.dist-info → tccli-3.0.1149.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1147.1.dist-info → tccli-3.0.1149.1.dist-info}/license_files/LICENSE +0 -0
@@ -890,7 +890,7 @@
|
|
890
890
|
"status": "online"
|
891
891
|
},
|
892
892
|
"ReceiveMessage": {
|
893
|
-
"document": "当前 ReceiveMessage 接口只支持 Partitioned 类型的 Topic。该接口用于接收发送到指定 Partitioned Topic 中的消息,当 Partitioned Topic 中没有消息但还去尝试调用该接口时,会抛出 ReceiveTimeout 的异常。\n\n如何使用 BatchReceivePolicy:\n\nBatchReceive 接口提供了如下三个参数:\n\n● MaxNumMessages: 即每次使用 BatchReceive 的时候,最多一次Receive接口返回多少条消息。\n● MaxNumBytes:即每次使用 BatchReceive 的时候,最多一次Receive接口返回多大内容的消息,单位是:bytes。\n● Timeout:即每次使用 BatchReceive 的时候,最多一次 Receive 接口的超时时间是多久,单位是:MS。\n\n默认如果上述三个参数都不指定,即关闭 BatchReceive 的特性。如果三个参数中的任意一个参数指定的数值大于 0,即开启 BatchReceive。BatchReceive 的结束条件为到达上述三个参数中任意一个指定的阈值。\n\n注意:MaxNumMessages 和 MaxNumBytes 每一次接收的最大消息同时受限于 ReceiveQueueSize 的大小,如果 ReceiveQueueSize 的大小设置为 5,MaxNumMessages 设置为10,那么一次 BatchReceive 接收的最多的消息是 5条,而不是10条。\n\n\n\nBatchReceivePolicy 的接口会一次性返回多条消息:\n\n1. 多条消息的内容之间使用特殊字符 '###' 来进行分割,业务侧接收到消息之后,可以利用不同语言提供的 Split 工具分割不同的消息。\n2. 多条消息的 MessageID 之间使用特殊字符 '###' 来进行分割,业务侧接收到消息之后,可以利用不同语言提供的 Split 工具分割不同的消息。(用于在调用 AcknowledgeMessage 接口中填入所需要的 MessageID
|
893
|
+
"document": "当前 ReceiveMessage 接口只支持 Partitioned 类型的 Topic。该接口用于接收发送到指定 Partitioned Topic 中的消息,当 Partitioned Topic 中没有消息但还去尝试调用该接口时,会抛出 ReceiveTimeout 的异常。\n\n如何使用 BatchReceivePolicy:\n\nBatchReceive 接口提供了如下三个参数:\n\n● MaxNumMessages: 即每次使用 BatchReceive 的时候,最多一次Receive接口返回多少条消息。\n● MaxNumBytes:即每次使用 BatchReceive 的时候,最多一次Receive接口返回多大内容的消息,单位是:bytes。\n● Timeout:即每次使用 BatchReceive 的时候,最多一次 Receive 接口的超时时间是多久,单位是:MS。\n\n默认如果上述三个参数都不指定,即关闭 BatchReceive 的特性。如果三个参数中的任意一个参数指定的数值大于 0,即开启 BatchReceive。BatchReceive 的结束条件为到达上述三个参数中任意一个指定的阈值。\n\n注意:MaxNumMessages 和 MaxNumBytes 每一次接收的最大消息同时受限于 ReceiveQueueSize 的大小,如果 ReceiveQueueSize 的大小设置为 5,MaxNumMessages 设置为10,那么一次 BatchReceive 接收的最多的消息是 5条,而不是10条。\n\n\n\nBatchReceivePolicy 的接口会一次性返回多条消息:\n\n1. 多条消息的内容之间使用特殊字符 '###' 来进行分割,业务侧接收到消息之后,可以利用不同语言提供的 Split 工具分割不同的消息。\n2. 多条消息的 MessageID 之间使用特殊字符 '###' 来进行分割,业务侧接收到消息之后,可以利用不同语言提供的 Split 工具分割不同的消息。(用于在调用 AcknowledgeMessage 接口中填入所需要的 MessageID 字段信息)",
|
894
894
|
"input": "ReceiveMessageRequest",
|
895
895
|
"name": "接收消息",
|
896
896
|
"output": "ReceiveMessageResponse",
|
@@ -15937,7 +15937,7 @@
|
|
15937
15937
|
"example": "{\"Response\":{\"MessageId\":\"26365:1475:0\"}}",
|
15938
15938
|
"member": "string",
|
15939
15939
|
"name": "MessageID",
|
15940
|
-
"
|
15940
|
+
"output_required": true,
|
15941
15941
|
"type": "string",
|
15942
15942
|
"value_allowed_null": false
|
15943
15943
|
},
|
@@ -15947,7 +15947,7 @@
|
|
15947
15947
|
"example": "my-payload",
|
15948
15948
|
"member": "string",
|
15949
15949
|
"name": "MessagePayload",
|
15950
|
-
"
|
15950
|
+
"output_required": true,
|
15951
15951
|
"type": "string",
|
15952
15952
|
"value_allowed_null": false
|
15953
15953
|
},
|
@@ -15957,7 +15957,7 @@
|
|
15957
15957
|
"example": "my-topic",
|
15958
15958
|
"member": "string",
|
15959
15959
|
"name": "AckTopic",
|
15960
|
-
"
|
15960
|
+
"output_required": true,
|
15961
15961
|
"type": "string",
|
15962
15962
|
"value_allowed_null": false
|
15963
15963
|
},
|
@@ -15967,7 +15967,7 @@
|
|
15967
15967
|
"example": "sssss",
|
15968
15968
|
"member": "string",
|
15969
15969
|
"name": "ErrorMsg",
|
15970
|
-
"
|
15970
|
+
"output_required": true,
|
15971
15971
|
"type": "string",
|
15972
15972
|
"value_allowed_null": true
|
15973
15973
|
},
|
@@ -15977,7 +15977,7 @@
|
|
15977
15977
|
"example": "my-sub",
|
15978
15978
|
"member": "string",
|
15979
15979
|
"name": "SubName",
|
15980
|
-
"
|
15980
|
+
"output_required": true,
|
15981
15981
|
"type": "string",
|
15982
15982
|
"value_allowed_null": true
|
15983
15983
|
},
|
@@ -15987,7 +15987,7 @@
|
|
15987
15987
|
"example": " \"71:12:0:0###71:13:0:0###71:16:0:0\"",
|
15988
15988
|
"member": "string",
|
15989
15989
|
"name": "MessageIDList",
|
15990
|
-
"
|
15990
|
+
"output_required": true,
|
15991
15991
|
"type": "string",
|
15992
15992
|
"value_allowed_null": true
|
15993
15993
|
},
|
@@ -15997,7 +15997,7 @@
|
|
15997
15997
|
"example": "\"hello-1###hello-2###hello-3\"",
|
15998
15998
|
"member": "string",
|
15999
15999
|
"name": "MessagesPayload",
|
16000
|
-
"
|
16000
|
+
"output_required": true,
|
16001
16001
|
"type": "string",
|
16002
16002
|
"value_allowed_null": true
|
16003
16003
|
},
|
@@ -18320,7 +18320,7 @@
|
|
18320
18320
|
"example": "{\"Response\":{\"MessageId\":\"26365:1475:0\"}}",
|
18321
18321
|
"member": "string",
|
18322
18322
|
"name": "MessageId",
|
18323
|
-
"
|
18323
|
+
"output_required": true,
|
18324
18324
|
"type": "string",
|
18325
18325
|
"value_allowed_null": true
|
18326
18326
|
},
|
@@ -18330,7 +18330,7 @@
|
|
18330
18330
|
"example": "\"\"",
|
18331
18331
|
"member": "string",
|
18332
18332
|
"name": "ErrorMsg",
|
18333
|
-
"
|
18333
|
+
"output_required": true,
|
18334
18334
|
"type": "string",
|
18335
18335
|
"value_allowed_null": true
|
18336
18336
|
},
|
@@ -18477,6 +18477,7 @@
|
|
18477
18477
|
"example": "{\"Response\":{\"MessageId\":\"26365:1475:0\"}}",
|
18478
18478
|
"member": "string",
|
18479
18479
|
"name": "MessageId",
|
18480
|
+
"output_required": true,
|
18480
18481
|
"type": "string",
|
18481
18482
|
"value_allowed_null": true
|
18482
18483
|
},
|
@@ -18486,6 +18487,7 @@
|
|
18486
18487
|
"example": "\"\"",
|
18487
18488
|
"member": "string",
|
18488
18489
|
"name": "ErrorMsg",
|
18490
|
+
"output_required": true,
|
18489
18491
|
"type": "string",
|
18490
18492
|
"value_allowed_null": true
|
18491
18493
|
},
|
@@ -1056,7 +1056,7 @@
|
|
1056
1056
|
{
|
1057
1057
|
"document": "",
|
1058
1058
|
"input": "POST / HTTP/1.1\nHost: tdmq.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ReceiveMessage\n<公共请求参数>\n\n{\n \"Topic\": \"tenant/namespace/topic\",\n \"SubscriptionName\": \"\\\"test-sub\\\"\"\n}",
|
1059
|
-
"output": "{\n \"Response\": {\n \"
|
1059
|
+
"output": "{\n \"Response\": {\n \"MessageID\": \"abc\",\n \"MessagePayload\": \"abc\",\n \"AckTopic\": \"abc\",\n \"ErrorMsg\": \"abc\",\n \"SubName\": \"abc\",\n \"MessageIDList\": \"abc\",\n \"MessagesPayload\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
|
1060
1060
|
"title": "接收消息"
|
1061
1061
|
}
|
1062
1062
|
],
|
@@ -2170,13 +2170,21 @@
|
|
2170
2170
|
"members": [
|
2171
2171
|
{
|
2172
2172
|
"disabled": false,
|
2173
|
-
"document": "实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:<br><li>Linux实例密码必须8到30位,至少包括两项[a-z],[A-Z]、[0-9] 和 [( ) \\` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]
|
2173
|
+
"document": "实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:<br><li>Linux实例密码必须8到30位,至少包括两项[a-z],[A-Z]、[0-9] 和 [( ) \\` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。</li><br><li>Windows实例密码必须12到30位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) \\` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? /]中的特殊符号。</li><br><br>若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。",
|
2174
2174
|
"example": "无",
|
2175
2175
|
"member": "string",
|
2176
2176
|
"name": "Password",
|
2177
2177
|
"required": false,
|
2178
|
-
"type": "string"
|
2179
|
-
|
2178
|
+
"type": "string"
|
2179
|
+
},
|
2180
|
+
{
|
2181
|
+
"disabled": false,
|
2182
|
+
"document": "实例登录密钥",
|
2183
|
+
"example": "无",
|
2184
|
+
"member": "string",
|
2185
|
+
"name": "KeyIds",
|
2186
|
+
"required": false,
|
2187
|
+
"type": "list"
|
2180
2188
|
}
|
2181
2189
|
],
|
2182
2190
|
"usage": "in"
|
@@ -8317,7 +8317,7 @@
|
|
8317
8317
|
"example": "[\"1.14.1\",\"1.16.1\"]",
|
8318
8318
|
"member": "string",
|
8319
8319
|
"name": "Versions",
|
8320
|
-
"
|
8320
|
+
"output_required": true,
|
8321
8321
|
"type": "list",
|
8322
8322
|
"value_allowed_null": false
|
8323
8323
|
},
|
@@ -8327,7 +8327,7 @@
|
|
8327
8327
|
"example": "1.0.1",
|
8328
8328
|
"member": "string",
|
8329
8329
|
"name": "EdgeVersionLatest",
|
8330
|
-
"
|
8330
|
+
"output_required": true,
|
8331
8331
|
"type": "string",
|
8332
8332
|
"value_allowed_null": true
|
8333
8333
|
},
|
@@ -8337,7 +8337,7 @@
|
|
8337
8337
|
"example": "1.0.1",
|
8338
8338
|
"member": "string",
|
8339
8339
|
"name": "EdgeVersionCurrent",
|
8340
|
-
"
|
8340
|
+
"output_required": true,
|
8341
8341
|
"type": "string",
|
8342
8342
|
"value_allowed_null": true
|
8343
8343
|
},
|
@@ -183,7 +183,7 @@
|
|
183
183
|
"status": "online"
|
184
184
|
},
|
185
185
|
"DescribeTrtcUsage": {
|
186
|
-
"document": "获取TRTC
|
186
|
+
"document": "获取TRTC音视频互动的用量明细,单位:分钟。\n- 查询时间小于等于1天时,返回每5分钟粒度的数据;查询时间大于1天时,返回按天汇总的数据。\n- 单次查询统计区间最多不能超过31天。\n- 若查询当天用量,由于统计延迟等原因,返回数据可能不够准确。\n- 该接口只用于历史用量数据统计或核对数据使用,关键业务逻辑不能使用。\n- 默认接口请求频率限制:5次/秒。",
|
187
187
|
"input": "DescribeTrtcUsageRequest",
|
188
188
|
"name": "查询TRTC音视频用量",
|
189
189
|
"output": "DescribeTrtcUsageResponse",
|
@@ -2602,7 +2602,7 @@
|
|
2602
2602
|
},
|
2603
2603
|
{
|
2604
2604
|
"disabled": false,
|
2605
|
-
"document": "
|
2605
|
+
"document": "各个时间点用量明细,单位:分钟",
|
2606
2606
|
"example": "无",
|
2607
2607
|
"member": "TrtcUsage",
|
2608
2608
|
"name": "UsageList",
|
@@ -6824,17 +6824,27 @@
|
|
6824
6824
|
"example": "无",
|
6825
6825
|
"member": "string",
|
6826
6826
|
"name": "TimeKey",
|
6827
|
-
"
|
6827
|
+
"output_required": true,
|
6828
6828
|
"type": "string",
|
6829
6829
|
"value_allowed_null": false
|
6830
6830
|
},
|
6831
6831
|
{
|
6832
6832
|
"disabled": false,
|
6833
|
-
"document": "
|
6833
|
+
"document": "时间点时间戳",
|
6834
|
+
"example": "无",
|
6835
|
+
"member": "uint64",
|
6836
|
+
"name": "TimeStampKey",
|
6837
|
+
"output_required": false,
|
6838
|
+
"type": "int",
|
6839
|
+
"value_allowed_null": false
|
6840
|
+
},
|
6841
|
+
{
|
6842
|
+
"disabled": false,
|
6843
|
+
"document": "用量数组。每个数值含义与UsageKey对应。单位:分钟。",
|
6834
6844
|
"example": "无",
|
6835
6845
|
"member": "float",
|
6836
6846
|
"name": "UsageValue",
|
6837
|
-
"
|
6847
|
+
"output_required": true,
|
6838
6848
|
"type": "list",
|
6839
6849
|
"value_allowed_null": false
|
6840
6850
|
}
|
tccli/services/tsf/tsf_client.py
CHANGED
@@ -7505,6 +7505,58 @@ def doDescribePathRewrites(args, parsed_globals):
|
|
7505
7505
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7506
7506
|
|
7507
7507
|
|
7508
|
+
def doDescribeGatewayApis(args, parsed_globals):
|
7509
|
+
g_param = parse_global_arg(parsed_globals)
|
7510
|
+
|
7511
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
7512
|
+
cred = credential.CVMRoleCredential()
|
7513
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7514
|
+
cred = credential.STSAssumeRoleCredential(
|
7515
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7516
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7517
|
+
)
|
7518
|
+
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):
|
7519
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
7520
|
+
else:
|
7521
|
+
cred = credential.Credential(
|
7522
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
7523
|
+
)
|
7524
|
+
http_profile = HttpProfile(
|
7525
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
7526
|
+
reqMethod="POST",
|
7527
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
7528
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
7529
|
+
)
|
7530
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
7531
|
+
if g_param[OptionsDefine.Language]:
|
7532
|
+
profile.language = g_param[OptionsDefine.Language]
|
7533
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
7534
|
+
client = mod.TsfClient(cred, g_param[OptionsDefine.Region], profile)
|
7535
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
7536
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7537
|
+
model = models.DescribeGatewayApisRequest()
|
7538
|
+
model.from_json_string(json.dumps(args))
|
7539
|
+
start_time = time.time()
|
7540
|
+
while True:
|
7541
|
+
rsp = client.DescribeGatewayApis(model)
|
7542
|
+
result = rsp.to_json_string()
|
7543
|
+
try:
|
7544
|
+
json_obj = json.loads(result)
|
7545
|
+
except TypeError as e:
|
7546
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
7547
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
7548
|
+
break
|
7549
|
+
cur_time = time.time()
|
7550
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
7551
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
7552
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
7553
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
7554
|
+
else:
|
7555
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
7556
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
7557
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7558
|
+
|
7559
|
+
|
7508
7560
|
def doDescribeDeliveryConfigs(args, parsed_globals):
|
7509
7561
|
g_param = parse_global_arg(parsed_globals)
|
7510
7562
|
|
@@ -9845,7 +9897,7 @@ def doDraftApiGroup(args, parsed_globals):
|
|
9845
9897
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9846
9898
|
|
9847
9899
|
|
9848
|
-
def
|
9900
|
+
def doModifyProgram(args, parsed_globals):
|
9849
9901
|
g_param = parse_global_arg(parsed_globals)
|
9850
9902
|
|
9851
9903
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9874,11 +9926,11 @@ def doDescribeGatewayApis(args, parsed_globals):
|
|
9874
9926
|
client = mod.TsfClient(cred, g_param[OptionsDefine.Region], profile)
|
9875
9927
|
client._sdkVersion += ("_CLI_" + __version__)
|
9876
9928
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9877
|
-
model = models.
|
9929
|
+
model = models.ModifyProgramRequest()
|
9878
9930
|
model.from_json_string(json.dumps(args))
|
9879
9931
|
start_time = time.time()
|
9880
9932
|
while True:
|
9881
|
-
rsp = client.
|
9933
|
+
rsp = client.ModifyProgram(model)
|
9882
9934
|
result = rsp.to_json_string()
|
9883
9935
|
try:
|
9884
9936
|
json_obj = json.loads(result)
|
@@ -10313,6 +10365,58 @@ def doDeleteConfig(args, parsed_globals):
|
|
10313
10365
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10314
10366
|
|
10315
10367
|
|
10368
|
+
def doCreateProgram(args, parsed_globals):
|
10369
|
+
g_param = parse_global_arg(parsed_globals)
|
10370
|
+
|
10371
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
10372
|
+
cred = credential.CVMRoleCredential()
|
10373
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10374
|
+
cred = credential.STSAssumeRoleCredential(
|
10375
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10376
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10377
|
+
)
|
10378
|
+
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):
|
10379
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
10380
|
+
else:
|
10381
|
+
cred = credential.Credential(
|
10382
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
10383
|
+
)
|
10384
|
+
http_profile = HttpProfile(
|
10385
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
10386
|
+
reqMethod="POST",
|
10387
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
10388
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
10389
|
+
)
|
10390
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
10391
|
+
if g_param[OptionsDefine.Language]:
|
10392
|
+
profile.language = g_param[OptionsDefine.Language]
|
10393
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
10394
|
+
client = mod.TsfClient(cred, g_param[OptionsDefine.Region], profile)
|
10395
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
10396
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10397
|
+
model = models.CreateProgramRequest()
|
10398
|
+
model.from_json_string(json.dumps(args))
|
10399
|
+
start_time = time.time()
|
10400
|
+
while True:
|
10401
|
+
rsp = client.CreateProgram(model)
|
10402
|
+
result = rsp.to_json_string()
|
10403
|
+
try:
|
10404
|
+
json_obj = json.loads(result)
|
10405
|
+
except TypeError as e:
|
10406
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
10407
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
10408
|
+
break
|
10409
|
+
cur_time = time.time()
|
10410
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
10411
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
10412
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
10413
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
10414
|
+
else:
|
10415
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
10416
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
10417
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10418
|
+
|
10419
|
+
|
10316
10420
|
def doModifyContainerReplicas(args, parsed_globals):
|
10317
10421
|
g_param = parse_global_arg(parsed_globals)
|
10318
10422
|
|
@@ -11664,6 +11768,7 @@ ACTION_MAP = {
|
|
11664
11768
|
"StopGroup": doStopGroup,
|
11665
11769
|
"DescribeGatewayMonitorOverview": doDescribeGatewayMonitorOverview,
|
11666
11770
|
"DescribePathRewrites": doDescribePathRewrites,
|
11771
|
+
"DescribeGatewayApis": doDescribeGatewayApis,
|
11667
11772
|
"DescribeDeliveryConfigs": doDescribeDeliveryConfigs,
|
11668
11773
|
"UpdateApiGroup": doUpdateApiGroup,
|
11669
11774
|
"ChangeApiUsableStatus": doChangeApiUsableStatus,
|
@@ -11709,7 +11814,7 @@ ACTION_MAP = {
|
|
11709
11814
|
"DeleteUnitNamespaces": doDeleteUnitNamespaces,
|
11710
11815
|
"DescribeInstances": doDescribeInstances,
|
11711
11816
|
"DraftApiGroup": doDraftApiGroup,
|
11712
|
-
"
|
11817
|
+
"ModifyProgram": doModifyProgram,
|
11713
11818
|
"DescribeMicroservices": doDescribeMicroservices,
|
11714
11819
|
"DescribeApiVersions": doDescribeApiVersions,
|
11715
11820
|
"DescribeGroup": doDescribeGroup,
|
@@ -11718,6 +11823,7 @@ ACTION_MAP = {
|
|
11718
11823
|
"DescribeDeliveryConfig": doDescribeDeliveryConfig,
|
11719
11824
|
"DescribeEnabledUnitRule": doDescribeEnabledUnitRule,
|
11720
11825
|
"DeleteConfig": doDeleteConfig,
|
11826
|
+
"CreateProgram": doCreateProgram,
|
11721
11827
|
"ModifyContainerReplicas": doModifyContainerReplicas,
|
11722
11828
|
"UpdateHealthCheckSettings": doUpdateHealthCheckSettings,
|
11723
11829
|
"DescribeInvocationMetricDataDimension": doDescribeInvocationMetricDataDimension,
|
@@ -210,6 +210,13 @@
|
|
210
210
|
"output": "CreatePathRewritesWithDetailRespResponse",
|
211
211
|
"status": "online"
|
212
212
|
},
|
213
|
+
"CreateProgram": {
|
214
|
+
"document": "创建数据集",
|
215
|
+
"input": "CreateProgramRequest",
|
216
|
+
"name": "创建数据集",
|
217
|
+
"output": "CreateProgramResponse",
|
218
|
+
"status": "online"
|
219
|
+
},
|
213
220
|
"CreatePublicConfig": {
|
214
221
|
"document": "创建公共配置项",
|
215
222
|
"input": "CreatePublicConfigRequest",
|
@@ -1274,6 +1281,13 @@
|
|
1274
1281
|
"output": "ModifyPathRewriteResponse",
|
1275
1282
|
"status": "online"
|
1276
1283
|
},
|
1284
|
+
"ModifyProgram": {
|
1285
|
+
"document": "更新数据集",
|
1286
|
+
"input": "ModifyProgramRequest",
|
1287
|
+
"name": "更新数据集",
|
1288
|
+
"output": "ModifyProgramResponse",
|
1289
|
+
"status": "online"
|
1290
|
+
},
|
1277
1291
|
"ModifyTask": {
|
1278
1292
|
"document": "修改任务",
|
1279
1293
|
"input": "ModifyTaskRequest",
|
@@ -8386,6 +8400,61 @@
|
|
8386
8400
|
],
|
8387
8401
|
"type": "object"
|
8388
8402
|
},
|
8403
|
+
"CreateProgramRequest": {
|
8404
|
+
"document": "CreateProgram请求参数结构体",
|
8405
|
+
"members": [
|
8406
|
+
{
|
8407
|
+
"disabled": false,
|
8408
|
+
"document": "数据集名称",
|
8409
|
+
"example": "无",
|
8410
|
+
"member": "string",
|
8411
|
+
"name": "ProgramName",
|
8412
|
+
"required": true,
|
8413
|
+
"type": "string"
|
8414
|
+
},
|
8415
|
+
{
|
8416
|
+
"disabled": false,
|
8417
|
+
"document": "数据集描述",
|
8418
|
+
"example": "无",
|
8419
|
+
"member": "string",
|
8420
|
+
"name": "ProgramDesc",
|
8421
|
+
"required": false,
|
8422
|
+
"type": "string"
|
8423
|
+
},
|
8424
|
+
{
|
8425
|
+
"disabled": false,
|
8426
|
+
"document": "数据项列表,传入null或空数组时不新增",
|
8427
|
+
"example": "无",
|
8428
|
+
"member": "ProgramItem",
|
8429
|
+
"name": "ProgramItemList",
|
8430
|
+
"required": false,
|
8431
|
+
"type": "list"
|
8432
|
+
}
|
8433
|
+
],
|
8434
|
+
"type": "object"
|
8435
|
+
},
|
8436
|
+
"CreateProgramResponse": {
|
8437
|
+
"document": "CreateProgram返回参数结构体",
|
8438
|
+
"members": [
|
8439
|
+
{
|
8440
|
+
"disabled": false,
|
8441
|
+
"document": "true: 创建成功;false: 创建失败",
|
8442
|
+
"example": "无",
|
8443
|
+
"member": "bool",
|
8444
|
+
"name": "Result",
|
8445
|
+
"output_required": true,
|
8446
|
+
"type": "bool",
|
8447
|
+
"value_allowed_null": false
|
8448
|
+
},
|
8449
|
+
{
|
8450
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
8451
|
+
"member": "string",
|
8452
|
+
"name": "RequestId",
|
8453
|
+
"type": "string"
|
8454
|
+
}
|
8455
|
+
],
|
8456
|
+
"type": "object"
|
8457
|
+
},
|
8389
8458
|
"CreatePublicConfigRequest": {
|
8390
8459
|
"document": "CreatePublicConfig请求参数结构体",
|
8391
8460
|
"members": [
|
@@ -22582,6 +22651,79 @@
|
|
22582
22651
|
],
|
22583
22652
|
"type": "object"
|
22584
22653
|
},
|
22654
|
+
"ModifyProgramRequest": {
|
22655
|
+
"document": "ModifyProgram请求参数结构体",
|
22656
|
+
"members": [
|
22657
|
+
{
|
22658
|
+
"disabled": false,
|
22659
|
+
"document": "数据集ID",
|
22660
|
+
"example": "无",
|
22661
|
+
"member": "string",
|
22662
|
+
"name": "ProgramId",
|
22663
|
+
"required": true,
|
22664
|
+
"type": "string"
|
22665
|
+
},
|
22666
|
+
{
|
22667
|
+
"disabled": false,
|
22668
|
+
"document": "数据集名称,不传入时不更新",
|
22669
|
+
"example": "无",
|
22670
|
+
"member": "string",
|
22671
|
+
"name": "ProgramName",
|
22672
|
+
"required": false,
|
22673
|
+
"type": "string"
|
22674
|
+
},
|
22675
|
+
{
|
22676
|
+
"disabled": false,
|
22677
|
+
"document": "数据集描述,不传入时不更新",
|
22678
|
+
"example": "无",
|
22679
|
+
"member": "string",
|
22680
|
+
"name": "ProgramDesc",
|
22681
|
+
"required": false,
|
22682
|
+
"type": "string"
|
22683
|
+
},
|
22684
|
+
{
|
22685
|
+
"disabled": false,
|
22686
|
+
"document": "数据项列表,传入null不更新,传入空数组全量删除",
|
22687
|
+
"example": "无",
|
22688
|
+
"member": "ProgramItem",
|
22689
|
+
"name": "ProgramItemList",
|
22690
|
+
"required": false,
|
22691
|
+
"type": "list"
|
22692
|
+
},
|
22693
|
+
{
|
22694
|
+
"disabled": false,
|
22695
|
+
"document": "ProgramItemList是否是空数组",
|
22696
|
+
"example": "无",
|
22697
|
+
"member": "bool",
|
22698
|
+
"name": "EmptyProgramItemList",
|
22699
|
+
"required": false,
|
22700
|
+
"type": "bool"
|
22701
|
+
}
|
22702
|
+
],
|
22703
|
+
"type": "object"
|
22704
|
+
},
|
22705
|
+
"ModifyProgramResponse": {
|
22706
|
+
"document": "ModifyProgram返回参数结构体",
|
22707
|
+
"members": [
|
22708
|
+
{
|
22709
|
+
"disabled": false,
|
22710
|
+
"document": "true: 更新成功;false: 更新失败",
|
22711
|
+
"example": "1",
|
22712
|
+
"member": "bool",
|
22713
|
+
"name": "Result",
|
22714
|
+
"output_required": true,
|
22715
|
+
"type": "bool",
|
22716
|
+
"value_allowed_null": false
|
22717
|
+
},
|
22718
|
+
{
|
22719
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
22720
|
+
"member": "string",
|
22721
|
+
"name": "RequestId",
|
22722
|
+
"type": "string"
|
22723
|
+
}
|
22724
|
+
],
|
22725
|
+
"type": "object"
|
22726
|
+
},
|
22585
22727
|
"ModifyTaskRequest": {
|
22586
22728
|
"document": "ModifyTask请求参数结构体",
|
22587
22729
|
"members": [
|
@@ -240,6 +240,14 @@
|
|
240
240
|
"title": "批量创建路径重写"
|
241
241
|
}
|
242
242
|
],
|
243
|
+
"CreateProgram": [
|
244
|
+
{
|
245
|
+
"document": "",
|
246
|
+
"input": "POST / HTTP/1.1\nHost: tsf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateProgram\n<公共请求参数>\n\n{\n \"ProgramName\": \"abc\",\n \"ProgramDesc\": \"abc\",\n \"ProgramItemList\": [\n {\n \"ProgramItemId\": \"abc\",\n \"Resource\": {\n \"ResourceId\": \"abc\",\n \"ResourceCode\": \"abc\",\n \"ResourceName\": \"abc\",\n \"ServiceCode\": \"abc\",\n \"ResourceAction\": \"abc\",\n \"IdField\": \"abc\",\n \"NameField\": \"abc\",\n \"SelectIdsField\": \"abc\",\n \"CreationTime\": 0,\n \"LastUpdateTime\": 0,\n \"DeleteFlag\": true,\n \"ResourceDesc\": \"abc\",\n \"CanSelectAll\": true,\n \"SearchWordField\": \"abc\",\n \"Index\": 0\n },\n \"ValueList\": [\n \"abc\"\n ],\n \"IsAll\": true,\n \"CreationTime\": 0,\n \"LastUpdateTime\": 0,\n \"DeleteFlag\": true,\n \"ProgramId\": \"abc\"\n }\n ]\n}",
|
247
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"3b15ccd0-650a-4d9a-96d4-db8a55579d38\",\n \"Result\": true\n }\n}",
|
248
|
+
"title": "创建数据集"
|
249
|
+
}
|
250
|
+
],
|
243
251
|
"CreatePublicConfig": [
|
244
252
|
{
|
245
253
|
"document": "",
|
@@ -1474,6 +1482,14 @@
|
|
1474
1482
|
"title": "修改路径重写顺序"
|
1475
1483
|
}
|
1476
1484
|
],
|
1485
|
+
"ModifyProgram": [
|
1486
|
+
{
|
1487
|
+
"document": "",
|
1488
|
+
"input": "POST / HTTP/1.1\nHost: tsf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyProgram\n<公共请求参数>\n\n{\n \"ProgramId\": \"abc\",\n \"ProgramName\": \"abc\",\n \"ProgramDesc\": \"abc\",\n \"ProgramItemList\": [\n {\n \"ProgramItemId\": \"abc\",\n \"Resource\": {\n \"ResourceId\": \"abc\",\n \"ResourceCode\": \"abc\",\n \"ResourceName\": \"abc\",\n \"ServiceCode\": \"abc\",\n \"ResourceAction\": \"abc\",\n \"IdField\": \"abc\",\n \"NameField\": \"abc\",\n \"SelectIdsField\": \"abc\",\n \"CreationTime\": 0,\n \"LastUpdateTime\": 0,\n \"DeleteFlag\": true,\n \"ResourceDesc\": \"abc\",\n \"CanSelectAll\": true,\n \"SearchWordField\": \"abc\",\n \"Index\": 0\n },\n \"ValueList\": [\n \"abc\"\n ],\n \"IsAll\": true,\n \"CreationTime\": 0,\n \"LastUpdateTime\": 0,\n \"DeleteFlag\": true,\n \"ProgramId\": \"abc\"\n }\n ],\n \"EmptyProgramItemList\": true\n}",
|
1489
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"3b15ccd0-650a-4d9a-96d4-db8a55579d38\",\n \"Result\": true\n }\n}",
|
1490
|
+
"title": "更新数据集"
|
1491
|
+
}
|
1492
|
+
],
|
1477
1493
|
"ModifyTask": [
|
1478
1494
|
{
|
1479
1495
|
"document": "修改任务",
|
@@ -3329,7 +3329,7 @@
|
|
3329
3329
|
},
|
3330
3330
|
{
|
3331
3331
|
"disabled": false,
|
3332
|
-
"document": "
|
3332
|
+
"document": "网络出口,当前仅支持精品BGP、静态单线,这2种IP 地址类型的指定出口传入,默认值:center_egress1,其它可选值:center_egress2、center_egress3",
|
3333
3333
|
"example": "无",
|
3334
3334
|
"member": "string",
|
3335
3335
|
"name": "Egress",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tccli
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.1149.1
|
4
4
|
Summary: Universal Command Line Environment for Tencent Cloud
|
5
5
|
Project-URL: Bug Tracker, https://github.com/TencentCloud/tencentcloud-cli/issues
|
6
6
|
Project-URL: Homepage, https://github.com/TencentCloud/tencentcloud-cli
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
14
14
|
Requires-Dist: jmespath==0.10.0
|
15
15
|
Requires-Dist: six==1.16.0
|
16
|
-
Requires-Dist: tencentcloud-sdk-python>=3.0.
|
16
|
+
Requires-Dist: tencentcloud-sdk-python>=3.0.1149
|
17
17
|
Description-Content-Type: text/markdown
|
18
18
|
|
19
19
|
# 命令行工具简介
|