tccli 3.0.1203.1__py2.py3-none-any.whl → 3.0.1204.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 CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1203.1'
1
+ __version__ = '3.0.1204.1'
@@ -217,8 +217,8 @@
217
217
  "members": [
218
218
  {
219
219
  "disabled": false,
220
- "document": "实例ID\t",
221
- "example": "1o8yMC47u\t",
220
+ "document": "业务系统ID\t",
221
+ "example": "apm-059oXBfTL",
222
222
  "member": "string",
223
223
  "name": "InstanceKey",
224
224
  "output_required": true,
@@ -228,7 +228,7 @@
228
228
  },
229
229
  {
230
230
  "disabled": false,
231
- "document": "服务名\t",
231
+ "document": "应用名\t",
232
232
  "example": "java-order-service\t",
233
233
  "member": "string",
234
234
  "name": "ServiceName",
@@ -250,7 +250,7 @@
250
250
  },
251
251
  {
252
252
  "disabled": false,
253
- "document": "异常过滤",
253
+ "document": "错误类型过滤",
254
254
  "example": "io.grpc.StatusRuntimeException,java.sql.(.*?)\t",
255
255
  "member": "string",
256
256
  "name": "ExceptionFilter",
@@ -261,7 +261,7 @@
261
261
  },
262
262
  {
263
263
  "disabled": false,
264
- "document": "错误码过滤\t",
264
+ "document": "HTTP状态码过滤",
265
265
  "example": "400,500\t",
266
266
  "member": "string",
267
267
  "name": "ErrorCodeFilter",
@@ -272,7 +272,7 @@
272
272
  },
273
273
  {
274
274
  "disabled": false,
275
- "document": "应用诊断开关\n注意:此字段可能返回 null,表示取不到有效值。",
275
+ "document": "应用诊断开关(已废弃)\n注意:此字段可能返回 null,表示取不到有效值。",
276
276
  "example": "true",
277
277
  "member": "bool",
278
278
  "name": "EventEnable",
@@ -338,7 +338,7 @@
338
338
  },
339
339
  {
340
340
  "disabled": false,
341
- "document": "日志来源\t\n注意:此字段可能返回 null,表示取不到有效值。",
341
+ "document": "日志源\t\n注意:此字段可能返回 null,表示取不到有效值。",
342
342
  "example": "CLS",
343
343
  "member": "string",
344
344
  "name": "LogSource",
@@ -349,7 +349,7 @@
349
349
  },
350
350
  {
351
351
  "disabled": false,
352
- "document": "CLS日志集 ",
352
+ "document": "日志集 ",
353
353
  "example": "postgres",
354
354
  "member": "string",
355
355
  "name": "LogSet",
@@ -360,7 +360,7 @@
360
360
  },
361
361
  {
362
362
  "disabled": false,
363
- "document": "日志主题ID",
363
+ "document": "日志主题",
364
364
  "example": "032f3078-10b6-46a0-978f-1696e8e79696",
365
365
  "member": "string",
366
366
  "name": "LogTopicID",
@@ -371,7 +371,7 @@
371
371
  },
372
372
  {
373
373
  "disabled": false,
374
- "document": "线程剖析开关",
374
+ "document": "方法栈快照开关 true 开启 false 关闭",
375
375
  "example": "false",
376
376
  "member": "bool",
377
377
  "name": "SnapshotEnable",
@@ -382,7 +382,7 @@
382
382
  },
383
383
  {
384
384
  "disabled": false,
385
- "document": "线程剖析超时阈值\t",
385
+ "document": "慢调用监听触发阈值",
386
386
  "example": "2000",
387
387
  "member": "int64",
388
388
  "name": "SnapshotTimeout",
@@ -393,7 +393,7 @@
393
393
  },
394
394
  {
395
395
  "disabled": false,
396
- "document": "探针开启开关",
396
+ "document": "探针总开关",
397
397
  "example": "true",
398
398
  "member": "bool",
399
399
  "name": "AgentEnable",
@@ -404,7 +404,7 @@
404
404
  },
405
405
  {
406
406
  "disabled": false,
407
- "document": "组件列表开关\n注意:此字段可能返回 null,表示取不到有效值。",
407
+ "document": "组件列表开关(已废弃)\n注意:此字段可能返回 null,表示取不到有效值。",
408
408
  "example": "[{\"Name\":\"dubbo\",\"Enable\":true},{\"Name\":\"googlehttpclient\",\"Enable\":true},{\"Name\":\"grpc\",\"Enable\":true},{\"Name\":\"httpclient3\",\"Enable\":true},{\"Name\":\"httpclient4\",\"Enable\":true},{\"Name\":\"hystrix\",\"Enable\":true},{\"Name\":\"lettuce\",\"Enable\":true},{\"Name\":\"mongodb\",\"Enable\":true},{\"Name\":\"mybatis\",\"Enable\":true},{\"Name\":\"mysql\",\"Enable\":true},{\"Name\":\"okhttp\",\"Enable\":true},{\"Name\":\"redis\",\"Enable\":true},{\"Name\":\"rxjava\",\"Enable\":true},{\"Name\":\"spring-webmvc\",\"Enable\":true},{\"Name\":\"tomcat\",\"Enable\":true}]",
409
409
  "member": "Instrument",
410
410
  "name": "InstrumentList",
@@ -415,7 +415,7 @@
415
415
  },
416
416
  {
417
417
  "disabled": false,
418
- "document": "链路压缩开关",
418
+ "document": "链路压缩开关(已废弃)",
419
419
  "example": "true",
420
420
  "member": "bool",
421
421
  "name": "TraceSquash",
@@ -2057,7 +2057,7 @@
2057
2057
  "members": [
2058
2058
  {
2059
2059
  "disabled": false,
2060
- "document": "实例Id",
2060
+ "document": "业务系统Id",
2061
2061
  "example": "apm-059oXBfTL",
2062
2062
  "member": "string",
2063
2063
  "name": "InstanceId",
@@ -2066,7 +2066,7 @@
2066
2066
  },
2067
2067
  {
2068
2068
  "disabled": false,
2069
- "document": "需要修改的字段key value分别指定字段名、字段值",
2069
+ "document": "需要修改的字段key value分别指定字段名、字段值\n[具体字段请见](https://cloud.tencent.com/document/product/248/111241)",
2070
2070
  "example": "\"Tags\":[{\"Key\":\"UrlConvergence\",\"Value\":\"RPCServer/market.MarketServiceleetcode9(.*?)\"},{\"Key\":\"UrlConvergenceThreshold\",\"Value\":\"600\"},{\"Key\":\"UrlConvergenceSwitch\",\"Value\":\"1\"},{\"Key\":\"AgentEnable\",\"Value\":\"true\"}]\t",
2071
2071
  "member": "ApmTag",
2072
2072
  "name": "Tags",
@@ -2075,7 +2075,7 @@
2075
2075
  },
2076
2076
  {
2077
2077
  "disabled": false,
2078
- "document": "需要修改配置的服务列表名称\t",
2078
+ "document": "需要修改配置的应用列表名称\t",
2079
2079
  "example": "\"ServiceNames\":[\"stock-service\",\"profile-service28\",\"profile-service08\"],\t",
2080
2080
  "member": "string",
2081
2081
  "name": "ServiceNames",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "DescribeGeneralApmApplicationConfig": [
28
28
  {
29
- "document": "查询指定实例下应用的配置信息",
29
+ "document": "查询指定业务系统下应用的配置信息",
30
30
  "input": "POST / HTTP/1.1\nHost: apm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeGeneralApmApplicationConfig\n<公共请求参数>\n\n{\n \"InstanceId\": \"apm-6xYKFXYxo\",\n \"ServiceName\": \"java-order-service\"\n}",
31
31
  "output": "{\n \"Response\": {\n \"ApmApplicationConfigView\": {\n \"InstanceKey\": \"apm-059oXBfTL\",\n \"ServiceName\": \"profile-service\",\n \"OperationNameFilter\": \"\",\n \"ExceptionFilter\": \"\",\n \"ErrorCodeFilter\": \"\",\n \"EventEnable\": false,\n \"UrlConvergenceSwitch\": 1,\n \"UrlConvergenceThreshold\": 500,\n \"UrlConvergence\": \"RPCServer/market.MarketService2/(.*?)\",\n \"UrlExclude\": \"\",\n \"IsRelatedLog\": 0,\n \"LogSource\": \"CLS\",\n \"LogSet\": \"\",\n \"LogTopicID\": \"\",\n \"SnapshotEnable\": true,\n \"SnapshotTimeout\": 2000,\n \"AgentEnable\": true,\n \"InstrumentList\": [\n {\n \"Name\": \"dubbo\",\n \"Enable\": true\n },\n {\n \"Name\": \"googlehttpclient\",\n \"Enable\": true\n },\n {\n \"Name\": \"grpc\",\n \"Enable\": true\n },\n {\n \"Name\": \"httpclient3\",\n \"Enable\": true\n },\n {\n \"Name\": \"httpclient4\",\n \"Enable\": true\n },\n {\n \"Name\": \"hystrix\",\n \"Enable\": true\n },\n {\n \"Name\": \"lettuce\",\n \"Enable\": true\n },\n {\n \"Name\": \"mongodb\",\n \"Enable\": true\n },\n {\n \"Name\": \"mybatis\",\n \"Enable\": true\n },\n {\n \"Name\": \"mysql\",\n \"Enable\": true\n },\n {\n \"Name\": \"okhttp\",\n \"Enable\": true\n },\n {\n \"Name\": \"redis\",\n \"Enable\": true\n },\n {\n \"Name\": \"rxjava\",\n \"Enable\": true\n },\n {\n \"Name\": \"spring-webmvc\",\n \"Enable\": true\n },\n {\n \"Name\": \"tomcat\",\n \"Enable\": true\n }\n ],\n \"TraceSquash\": true\n },\n \"RequestId\": \"test-test-test0980990\"\n }\n}",
32
32
  "title": "查询应用配置信息"
@@ -8081,6 +8081,15 @@
8081
8081
  "name": "Limit",
8082
8082
  "required": false,
8083
8083
  "type": "int"
8084
+ },
8085
+ {
8086
+ "disabled": false,
8087
+ "document": "控制Filters相关字段是否为精确匹配。 0: 默认值,shipperName模糊匹配 1: shipperName 精确匹配",
8088
+ "example": "无",
8089
+ "member": "uint64",
8090
+ "name": "PreciseSearch",
8091
+ "required": false,
8092
+ "type": "int"
8084
8093
  }
8085
8094
  ],
8086
8095
  "type": "object"
@@ -4506,6 +4506,7 @@
4506
4506
  "example": "2",
4507
4507
  "member": "int64",
4508
4508
  "name": "TotalCount",
4509
+ "output_required": true,
4509
4510
  "type": "int",
4510
4511
  "value_allowed_null": false
4511
4512
  },
@@ -4515,6 +4516,7 @@
4515
4516
  "example": "NA",
4516
4517
  "member": "RepairTaskInfo",
4517
4518
  "name": "RepairTaskInfoSet",
4519
+ "output_required": true,
4518
4520
  "type": "list",
4519
4521
  "value_allowed_null": true
4520
4522
  },
@@ -9958,6 +9960,7 @@
9958
9960
  "example": "rep-xxxxxxxx",
9959
9961
  "member": "string",
9960
9962
  "name": "TaskId",
9963
+ "output_required": true,
9961
9964
  "type": "string",
9962
9965
  "value_allowed_null": false
9963
9966
  },
@@ -3867,6 +3867,58 @@ def doChannelCreateUserAutoSignSealUrl(args, parsed_globals):
3867
3867
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3868
3868
 
3869
3869
 
3870
+ def doCreateChannelSubOrganizationActive(args, parsed_globals):
3871
+ g_param = parse_global_arg(parsed_globals)
3872
+
3873
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3874
+ cred = credential.CVMRoleCredential()
3875
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3876
+ cred = credential.STSAssumeRoleCredential(
3877
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3878
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3879
+ )
3880
+ 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):
3881
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3882
+ else:
3883
+ cred = credential.Credential(
3884
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3885
+ )
3886
+ http_profile = HttpProfile(
3887
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3888
+ reqMethod="POST",
3889
+ endpoint=g_param[OptionsDefine.Endpoint],
3890
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3891
+ )
3892
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3893
+ if g_param[OptionsDefine.Language]:
3894
+ profile.language = g_param[OptionsDefine.Language]
3895
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3896
+ client = mod.EssbasicClient(cred, g_param[OptionsDefine.Region], profile)
3897
+ client._sdkVersion += ("_CLI_" + __version__)
3898
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3899
+ model = models.CreateChannelSubOrganizationActiveRequest()
3900
+ model.from_json_string(json.dumps(args))
3901
+ start_time = time.time()
3902
+ while True:
3903
+ rsp = client.CreateChannelSubOrganizationActive(model)
3904
+ result = rsp.to_json_string()
3905
+ try:
3906
+ json_obj = json.loads(result)
3907
+ except TypeError as e:
3908
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3909
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3910
+ break
3911
+ cur_time = time.time()
3912
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3913
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3914
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3915
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3916
+ else:
3917
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3918
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3919
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3920
+
3921
+
3870
3922
  def doGenerateOrganizationSeal(args, parsed_globals):
3871
3923
  g_param = parse_global_arg(parsed_globals)
3872
3924
 
@@ -6866,6 +6918,7 @@ ACTION_MAP = {
6866
6918
  "ChannelGetTaskResultApi": doChannelGetTaskResultApi,
6867
6919
  "DescribeSubOrganizations": doDescribeSubOrganizations,
6868
6920
  "ChannelCreateUserAutoSignSealUrl": doChannelCreateUserAutoSignSealUrl,
6921
+ "CreateChannelSubOrganizationActive": doCreateChannelSubOrganizationActive,
6869
6922
  "GenerateOrganizationSeal": doGenerateOrganizationSeal,
6870
6923
  "DescribeFileIdsByCustomIds": doDescribeFileIdsByCustomIds,
6871
6924
  "DescribeTemplates": doDescribeTemplates,
@@ -343,6 +343,13 @@
343
343
  "output": "CreateChannelOrganizationInfoChangeUrlResponse",
344
344
  "status": "online"
345
345
  },
346
+ "CreateChannelSubOrganizationActive": {
347
+ "document": "激活或续期子客企业, 在激活状态下,企业可以正常发起合同;在非激活状态下,企业仅能查看和签署合同。\n\n**1. 激活**:使用一个许可证将子客企业从未激活状态转变为激活状态。**激活状态的有效期为一年,一年后将自动回到未激活状态**。\n\n**2. 续期**:使用一个许可证将已激活的子客企业的有效期延长一年。只有处于激活状态的子企业才能进行续期操作(**若处于非激活状态,则需先激活**)。您可以使用多个许可证对同一子客企业进行多次续费。\n\n\n该接口的效果同:**【企业应用管理】 -> 【子客企业管理】 -> 【激活】或者【续期】**\n\n![image](https://qcloudimg.tencent-cloud.cn/raw/cd63761ca6e814c64b4ecf131555b74e.png)\n\n\n如果不想调用此接口或者页面点击进行激活或续期,可以在【应用扩展服务】中打开自动激活或续期,在许可证充足的情况下会自动激活或续期子客企业\n\n![image](https://qcloudimg.tencent-cloud.cn/raw/2ccb37ef6bde463c15c39fdda789216f.png)",
348
+ "input": "CreateChannelSubOrganizationActiveRequest",
349
+ "name": "激活或者续期子企业",
350
+ "output": "CreateChannelSubOrganizationActiveResponse",
351
+ "status": "online"
352
+ },
346
353
  "CreateConsoleLoginUrl": {
347
354
  "document": "此接口(CreateConsoleLoginUrl)用于创建第三方平台子客企业控制台Web/移动登录链接。支持web控制台、电子签小程序和H5链接。登录链接是进入子客web企业控制台的唯一入口。\n\nWeb链接访问后,会根据子客企业(**Agent中ProxyOrganizationOpenId表示**)和员工(**Agent中OpenId表示**)的状态,进入不同的流程,主要情况分类如下:\n<table>\n<thead>\n<tr>\n<th>子客企业状态</th>\n<th>子客企业员工状态</th>\n<th>点击链接进入的流程</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>企业未激活</td>\n<td>员工未认证</td>\n<td>进入企业激活流程,首次完成企业激活流程的员工会成为超管</td>\n</tr>\n<tr>\n<td>企业已激活</td>\n<td>员工未认证</td>\n<td>进入员工认证并加入企业流程</td>\n</tr>\n<tr>\n<td>企业已激活</td>\n<td>员工已认证</td>\n<td>进入子客企业Web控制台</td>\n</tr>\n</tbody>\n</table>\n如果是企业激活流程,需要注意如下情况:\n\n1. 若在激活过程中,**更换用户OpenID重新生成链接,之前的认证会被清理**。因此不要在企业认证过程生成多个链接给多人同时操作,会导致认证过程互相影响。\n2. 若您认证中发现信息有误需要重新认证,**可通过更换用户OpenID重新生成链接的方式,来清理掉已有的流程**。\n\n系统的渠道企业, 应用, 子客企业, 子客员工的组织形式\n![image](https://qcloudimg.tencent-cloud.cn/raw/77677faeea26c9d7f37474597c81fe01.png)\n\n\n<font color=\"red\">相关视频指引</font> <br>\n1. <a href=\"https://dyn.ess.tencent.cn/guide/apivideo/essbasic-createconsoleloginin.mp4\" target=\"_blank\">【生成子客登录链接】代码编写 & 子企业认证示例</a><br>",
348
355
  "input": "CreateConsoleLoginUrlRequest",
@@ -5110,6 +5117,28 @@
5110
5117
  "required": false,
5111
5118
  "type": "string",
5112
5119
  "value_allowed_null": false
5120
+ },
5121
+ {
5122
+ "disabled": false,
5123
+ "document": "子企业激活状态。值如下:\n<ul>\n <li>**0**: 未激活</li>\n <li>**1**: 已激活</li>\n</ul>",
5124
+ "example": "0",
5125
+ "member": "int64",
5126
+ "name": "ActiveStatus",
5127
+ "output_required": false,
5128
+ "required": false,
5129
+ "type": "int",
5130
+ "value_allowed_null": false
5131
+ },
5132
+ {
5133
+ "disabled": false,
5134
+ "document": "账号过期时间,时间戳",
5135
+ "example": "无",
5136
+ "member": "int64",
5137
+ "name": "LicenseExpireTime",
5138
+ "output_required": false,
5139
+ "required": false,
5140
+ "type": "int",
5141
+ "value_allowed_null": false
5113
5142
  }
5114
5143
  ],
5115
5144
  "usage": "both"
@@ -6191,6 +6220,51 @@
6191
6220
  ],
6192
6221
  "type": "object"
6193
6222
  },
6223
+ "CreateChannelSubOrganizationActiveRequest": {
6224
+ "document": "CreateChannelSubOrganizationActive请求参数结构体",
6225
+ "members": [
6226
+ {
6227
+ "disabled": false,
6228
+ "document": "关于渠道应用的相关信息,包括渠道应用标识、第三方平台子客企业标识及第三方平台子客企业中的员工标识等内容,您可以参阅开发者中心所提供的 Agent 结构体以获取详细定义。\n\n此接口下面信息必填。\n<ul>\n<li>渠道应用标识: Agent.AppId</li>\n<li>第三方平台子客企业标识: Agent.ProxyOrganizationOpenId</li>\n<li>第三方平台子客企业中的员工标识: Agent. ProxyOperator.OpenId</li>\n</ul>\n第三方平台子客企业和员工必须已经经过实名认证",
6229
+ "example": "无",
6230
+ "member": "Agent",
6231
+ "name": "Agent",
6232
+ "required": true,
6233
+ "type": "object"
6234
+ },
6235
+ {
6236
+ "disabled": false,
6237
+ "document": "要进行激活或者续期的子客企业OrganizationOpenId列表,请确保所有列出的子客企业均已完成认证。",
6238
+ "example": "无",
6239
+ "member": "string",
6240
+ "name": "SubOrganizationOpenIds",
6241
+ "required": false,
6242
+ "type": "list"
6243
+ },
6244
+ {
6245
+ "disabled": false,
6246
+ "document": "操作类型,可以选择如下:\n\n**false**:(默认)激活子客企业\n**true**:续期子客企业\n",
6247
+ "example": "无",
6248
+ "member": "bool",
6249
+ "name": "Renew",
6250
+ "required": false,
6251
+ "type": "bool"
6252
+ }
6253
+ ],
6254
+ "type": "object"
6255
+ },
6256
+ "CreateChannelSubOrganizationActiveResponse": {
6257
+ "document": "CreateChannelSubOrganizationActive返回参数结构体",
6258
+ "members": [
6259
+ {
6260
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
6261
+ "member": "string",
6262
+ "name": "RequestId",
6263
+ "type": "string"
6264
+ }
6265
+ ],
6266
+ "type": "object"
6267
+ },
6194
6268
  "CreateConsoleLoginUrlRequest": {
6195
6269
  "document": "CreateConsoleLoginUrl请求参数结构体",
6196
6270
  "members": [
@@ -782,6 +782,20 @@
782
782
  "title": "创建超管变更链接(小程序链接)"
783
783
  }
784
784
  ],
785
+ "CreateChannelSubOrganizationActive": [
786
+ {
787
+ "document": "org_zhangsan和org_lisi两个企业已经是激活态,现在花费两个许可证给两个子客企业分别再续期1年",
788
+ "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateChannelSubOrganizationActive\n<公共请求参数>\n\n{\n \"Agent\": {\n \"AppId\": \"yDwhxUUckp3gl8j5UuFX33LSNozpRsbi\",\n \"ProxyOrganizationOpenId\": \"org_dianziqian\",\n \"ProxyOperator\": {\n \"OpenId\": \"n9527\"\n }\n },\n \"SubOrganizationOpenIds\": [\n \"org_zhangsan\",\n \"org_lisi\"\n ],\n \"Renew\": true\n}",
789
+ "output": "{\n \"Response\": {\n \"RequestId\": \"00f08f1c-3823-44c3-8cd1-4e66a0587ab4\"\n }\n}",
790
+ "title": "子客续期"
791
+ },
792
+ {
793
+ "document": "org_zhangsan和org_lisi两个企业现在是非激活态(可能是过期,也可能是没有激活过),现在花费两个许可证激活这两个子客企业",
794
+ "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateChannelSubOrganizationActive\n<公共请求参数>\n\n{\n \"Agent\": {\n \"AppId\": \"yDwhxUUckp3gl8j5UuFX33LSNozpRsbi\",\n \"ProxyOrganizationOpenId\": \"org_dianziqian\",\n \"ProxyOperator\": {\n \"OpenId\": \"n9527\"\n }\n },\n \"SubOrganizationOpenIds\": [\n \"org_zhangsan\",\n \"org_lisi\"\n ]\n}",
795
+ "output": "{\n \"Response\": {\n \"RequestId\": \"00f08f1c-3823-44c3-8cd1-4e66a0587ab4\"\n }\n}",
796
+ "title": "子客激活"
797
+ }
798
+ ],
785
799
  "CreateConsoleLoginUrl": [
786
800
  {
787
801
  "document": "如果<b>典子谦示例企业的员工张三已经完成了认证和加入企业</b>, 此时给典子谦示例企业的员工张三生成登录的PC控制台的链接\n\n典子谦示例企业的定义标识为:org_dianziqian\n员工张三定义员工标识为:n9527\n",
@@ -3033,7 +3033,7 @@ def doDescribeDBTmpInstances(args, parsed_globals):
3033
3033
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3034
3034
 
3035
3035
 
3036
- def doIsolateHourDBInstance(args, parsed_globals):
3036
+ def doDescribeDBSyncMode(args, parsed_globals):
3037
3037
  g_param = parse_global_arg(parsed_globals)
3038
3038
 
3039
3039
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3062,11 +3062,11 @@ def doIsolateHourDBInstance(args, parsed_globals):
3062
3062
  client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
3063
3063
  client._sdkVersion += ("_CLI_" + __version__)
3064
3064
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3065
- model = models.IsolateHourDBInstanceRequest()
3065
+ model = models.DescribeDBSyncModeRequest()
3066
3066
  model.from_json_string(json.dumps(args))
3067
3067
  start_time = time.time()
3068
3068
  while True:
3069
- rsp = client.IsolateHourDBInstance(model)
3069
+ rsp = client.DescribeDBSyncMode(model)
3070
3070
  result = rsp.to_json_string()
3071
3071
  try:
3072
3072
  json_obj = json.loads(result)
@@ -3605,6 +3605,58 @@ def doCloneAccount(args, parsed_globals):
3605
3605
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3606
3606
 
3607
3607
 
3608
+ def doIsolateHourDBInstance(args, parsed_globals):
3609
+ g_param = parse_global_arg(parsed_globals)
3610
+
3611
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3612
+ cred = credential.CVMRoleCredential()
3613
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3614
+ cred = credential.STSAssumeRoleCredential(
3615
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3616
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3617
+ )
3618
+ 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):
3619
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3620
+ else:
3621
+ cred = credential.Credential(
3622
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3623
+ )
3624
+ http_profile = HttpProfile(
3625
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3626
+ reqMethod="POST",
3627
+ endpoint=g_param[OptionsDefine.Endpoint],
3628
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3629
+ )
3630
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3631
+ if g_param[OptionsDefine.Language]:
3632
+ profile.language = g_param[OptionsDefine.Language]
3633
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3634
+ client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
3635
+ client._sdkVersion += ("_CLI_" + __version__)
3636
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3637
+ model = models.IsolateHourDBInstanceRequest()
3638
+ model.from_json_string(json.dumps(args))
3639
+ start_time = time.time()
3640
+ while True:
3641
+ rsp = client.IsolateHourDBInstance(model)
3642
+ result = rsp.to_json_string()
3643
+ try:
3644
+ json_obj = json.loads(result)
3645
+ except TypeError as e:
3646
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3647
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3648
+ break
3649
+ cur_time = time.time()
3650
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3651
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3652
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3653
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3654
+ else:
3655
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3656
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3657
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3658
+
3659
+
3608
3660
  def doUpgradeDBInstance(args, parsed_globals):
3609
3661
  g_param = parse_global_arg(parsed_globals)
3610
3662
 
@@ -4038,7 +4090,7 @@ ACTION_MAP = {
4038
4090
  "GrantAccountPrivileges": doGrantAccountPrivileges,
4039
4091
  "ModifyRealServerAccessStrategy": doModifyRealServerAccessStrategy,
4040
4092
  "DescribeDBTmpInstances": doDescribeDBTmpInstances,
4041
- "IsolateHourDBInstance": doIsolateHourDBInstance,
4093
+ "DescribeDBSyncMode": doDescribeDBSyncMode,
4042
4094
  "DescribeDatabases": doDescribeDatabases,
4043
4095
  "IsolateDedicatedDBInstance": doIsolateDedicatedDBInstance,
4044
4096
  "ModifyInstanceVport": doModifyInstanceVport,
@@ -4049,6 +4101,7 @@ ACTION_MAP = {
4049
4101
  "CancelDcnJob": doCancelDcnJob,
4050
4102
  "TerminateDedicatedDBInstance": doTerminateDedicatedDBInstance,
4051
4103
  "CloneAccount": doCloneAccount,
4104
+ "IsolateHourDBInstance": doIsolateHourDBInstance,
4052
4105
  "UpgradeDBInstance": doUpgradeDBInstance,
4053
4106
  "ModifyBackupConfigs": doModifyBackupConfigs,
4054
4107
  "DescribeBinlogTime": doDescribeBinlogTime,
@@ -182,6 +182,13 @@
182
182
  "output": "DescribeDBSlowLogsResponse",
183
183
  "status": "online"
184
184
  },
185
+ "DescribeDBSyncMode": {
186
+ "document": "本接口(DescribeDBSyncMode)用于查询云数据库实例的同步模式。",
187
+ "input": "DescribeDBSyncModeRequest",
188
+ "name": "查询同步模式",
189
+ "output": "DescribeDBSyncModeResponse",
190
+ "status": "online"
191
+ },
185
192
  "DescribeDBTmpInstances": {
186
193
  "document": "本接口(DescribeDBTmpInstances)用于获取实例回档生成的临时实例",
187
194
  "input": "DescribeDBTmpInstancesRequest",
@@ -4983,6 +4990,63 @@
4983
4990
  ],
4984
4991
  "type": "object"
4985
4992
  },
4993
+ "DescribeDBSyncModeRequest": {
4994
+ "document": "DescribeDBSyncMode请求参数结构体",
4995
+ "members": [
4996
+ {
4997
+ "disabled": false,
4998
+ "document": "实例ID,形如:tdsql-ow728lmc",
4999
+ "example": "tdsql-avw0207d",
5000
+ "member": "string",
5001
+ "name": "InstanceId",
5002
+ "required": true,
5003
+ "type": "string"
5004
+ }
5005
+ ],
5006
+ "type": "object"
5007
+ },
5008
+ "DescribeDBSyncModeResponse": {
5009
+ "document": "DescribeDBSyncMode返回参数结构体",
5010
+ "members": [
5011
+ {
5012
+ "disabled": false,
5013
+ "document": "同步模式:0 异步,1 强同步, 2 强同步可退化",
5014
+ "example": "0",
5015
+ "member": "int64",
5016
+ "name": "SyncMode",
5017
+ "required": true,
5018
+ "type": "int",
5019
+ "value_allowed_null": false
5020
+ },
5021
+ {
5022
+ "disabled": false,
5023
+ "document": "是否有修改流程在执行中:1 是, 0 否。",
5024
+ "example": "0",
5025
+ "member": "int64",
5026
+ "name": "IsModifying",
5027
+ "required": true,
5028
+ "type": "int",
5029
+ "value_allowed_null": false
5030
+ },
5031
+ {
5032
+ "disabled": false,
5033
+ "document": "当前复制方式,0 异步,1 同步",
5034
+ "example": "0",
5035
+ "member": "int64",
5036
+ "name": "CurrentSyncMode",
5037
+ "required": true,
5038
+ "type": "int",
5039
+ "value_allowed_null": false
5040
+ },
5041
+ {
5042
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
5043
+ "member": "string",
5044
+ "name": "RequestId",
5045
+ "type": "string"
5046
+ }
5047
+ ],
5048
+ "type": "object"
5049
+ },
4986
5050
  "DescribeDBTmpInstancesRequest": {
4987
5051
  "document": "DescribeDBTmpInstances请求参数结构体",
4988
5052
  "members": [
@@ -208,6 +208,14 @@
208
208
  "title": "查询慢查询日志列表"
209
209
  }
210
210
  ],
211
+ "DescribeDBSyncMode": [
212
+ {
213
+ "document": "",
214
+ "input": "https://mariadb.tencentcloudapi.com/?Action=DescribeDBSyncMode\n&InstanceId=tdsql-avw0207d\n&<公共请求参数>",
215
+ "output": "{\n \"Response\": {\n \"RequestId\": \"901bd41c-08a2-4001-8364-5a63f32056ae\",\n \"SyncMode\": 0,\n \"CurrentSyncMode\": 0,\n \"IsModifying\": 0\n }\n}",
216
+ "title": "查询云数据库同步模式"
217
+ }
218
+ ],
211
219
  "DescribeDBTmpInstances": [
212
220
  {
213
221
  "document": "",
@@ -3476,7 +3476,7 @@
3476
3476
  "example": "10",
3477
3477
  "member": "int64",
3478
3478
  "name": "TotalCount",
3479
- "required": true,
3479
+ "output_required": true,
3480
3480
  "type": "int",
3481
3481
  "value_allowed_null": true
3482
3482
  },
@@ -3486,7 +3486,7 @@
3486
3486
  "example": "无",
3487
3487
  "member": "RequestStatus",
3488
3488
  "name": "Data",
3489
- "required": true,
3489
+ "output_required": true,
3490
3490
  "type": "list",
3491
3491
  "value_allowed_null": true
3492
3492
  },
@@ -172,7 +172,7 @@
172
172
  {
173
173
  "document": "",
174
174
  "input": "https://scf.tencentcloudapi.com/?Action=GetRequestStatus\n&FunctionName=<FunctionName>\n&FunctionRequestId=<FunctionRequestId>\n&<公共请求参数>",
175
- "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"Data\": [\n {\n \"MemUsage\": 0.0,\n \"RetCode\": 0,\n \"RetMsg\": \"xx\",\n \"RequestId\": \"xx\",\n \"StartTime\": \"xx\",\n \"Duration\": 0.0,\n \"RetryNum\": 0,\n \"FunctionName\": \"xx\"\n }\n ],\n \"RequestId\": \"xx\"\n }\n}",
175
+ "output": "{\n \"Response\": {\n \"TotalCount\": 0,\n \"Data\": [\n {\n \"FunctionName\": \"abc\",\n \"RetMsg\": \"abc\",\n \"RequestId\": \"abc\",\n \"StartTime\": \"abc\",\n \"RetCode\": 0,\n \"Duration\": 0,\n \"MemUsage\": 0,\n \"RetryNum\": 0\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
176
176
  "title": "获取函数运行状态"
177
177
  }
178
178
  ],
@@ -2377,7 +2377,7 @@
2377
2377
  },
2378
2378
  {
2379
2379
  "disabled": false,
2380
- "document": "购买实例的宿主机类型,CLOUD_PREMIUM-虚拟机高性能云盘,CLOUD_SSD-虚拟机SSD云盘,CLOUD_HSSD-虚拟机加强型SSD云盘,CLOUD_TSSD-虚拟机极速型SSD云盘,CLOUD_BSSD-虚拟机通用型SSD云盘",
2380
+ "document": "购买实例的宿主机类型,CLOUD_PREMIUM-虚拟机高性能云硬盘,CLOUD_SSD-虚拟机SSD云硬盘,CLOUD_HSSD-虚拟机增强型SSD云硬盘,CLOUD_BSSD-虚拟机通用型SSD云盘",
2381
2381
  "example": "CLOUD_PREMIUM",
2382
2382
  "member": "string",
2383
2383
  "name": "MachineType",
@@ -41553,6 +41553,15 @@
41553
41553
  "name": "ConnDetectConfig",
41554
41554
  "required": false,
41555
41555
  "type": "list"
41556
+ },
41557
+ {
41558
+ "disabled": false,
41559
+ "document": "仓库唯一id",
41560
+ "example": "无",
41561
+ "member": "int64",
41562
+ "name": "RegistryId",
41563
+ "required": false,
41564
+ "type": "int"
41556
41565
  }
41557
41566
  ],
41558
41567
  "type": "object"