tccli 3.0.1148.1__py2.py3-none-any.whl → 3.0.1149.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/cam/v20190116/api.json +4 -4
  3. tccli/services/cam/v20190116/examples.json +1 -1
  4. tccli/services/cwp/v20180228/api.json +63 -16
  5. tccli/services/cwp/v20180228/examples.json +1 -1
  6. tccli/services/ess/ess_client.py +53 -0
  7. tccli/services/ess/v20201111/api.json +67 -5
  8. tccli/services/ess/v20201111/examples.json +14 -0
  9. tccli/services/essbasic/essbasic_client.py +57 -4
  10. tccli/services/essbasic/v20210526/api.json +56 -3
  11. tccli/services/essbasic/v20210526/examples.json +8 -0
  12. tccli/services/gaap/gaap_client.py +53 -0
  13. tccli/services/gaap/v20180529/api.json +24 -0
  14. tccli/services/gaap/v20180529/examples.json +8 -0
  15. tccli/services/live/v20180801/api.json +6 -0
  16. tccli/services/live/v20180801/examples.json +1 -1
  17. tccli/services/mariadb/mariadb_client.py +53 -0
  18. tccli/services/mariadb/v20170312/api.json +88 -0
  19. tccli/services/mariadb/v20170312/examples.json +8 -0
  20. tccli/services/mongodb/v20190725/api.json +35 -35
  21. tccli/services/monitor/v20180724/api.json +1 -1
  22. tccli/services/oceanus/v20190422/api.json +24 -0
  23. tccli/services/organization/v20210331/api.json +1 -1
  24. tccli/services/rum/v20210622/api.json +9 -0
  25. tccli/services/tdmq/v20200217/api.json +4 -2
  26. tccli/services/thpc/v20230321/api.json +11 -3
  27. tccli/services/trtc/v20190722/api.json +15 -5
  28. {tccli-3.0.1148.1.dist-info → tccli-3.0.1149.1.dist-info}/METADATA +2 -2
  29. {tccli-3.0.1148.1.dist-info → tccli-3.0.1149.1.dist-info}/RECORD +32 -32
  30. {tccli-3.0.1148.1.dist-info → tccli-3.0.1149.1.dist-info}/WHEEL +0 -0
  31. {tccli-3.0.1148.1.dist-info → tccli-3.0.1149.1.dist-info}/entry_points.txt +0 -0
  32. {tccli-3.0.1148.1.dist-info → tccli-3.0.1149.1.dist-info}/license_files/LICENSE +0 -0
@@ -343,6 +343,13 @@
343
343
  "output": "CreateConsoleLoginUrlResponse",
344
344
  "status": "online"
345
345
  },
346
+ "CreateEmployeeQualificationSealQrCode": {
347
+ "document": "该接口用于获取个人授权执业章给企业的二维码,需要个人用户通过微信扫码。扫描后将跳转到腾讯电子签小程序,进入到授权执业章的流程。个人用户授权成功后,企业印章管理员需对印章进行审核,审核通过后,即可使用个人授权的执业章进行盖章操作。\n\n**注意**\n1. 该二维码**有效期为7天**,过期后将失效,可重新创建。",
348
+ "input": "CreateEmployeeQualificationSealQrCodeRequest",
349
+ "name": "创建个人印章授权给企业使用的授权二维码",
350
+ "output": "CreateEmployeeQualificationSealQrCodeResponse",
351
+ "status": "online"
352
+ },
346
353
  "CreateFlowBlockchainEvidenceUrl": {
347
354
  "document": "获取区块链存证证书查看链接/二维码接口\n\n适用场景:企业员工可以通过此接口生成合同区块链存证证书的查看链接/二维码,以供他人扫码打开腾讯电子签小程序查看。\n\n[点击查看区块链存证证书样式](https://qcloudimg.tencent-cloud.cn/raw/47d5e9c2ffa90ad4e27b3cd14095aa08.jpg)\n\n注:\n<ul><li>1. 二维码下载链接过期时间为5分钟,请尽快下载保存。二维码/短链的过期时间为<font color=\"red\">7天</font>,超过有效期则不可用。</li>\n<li>2. 合同状态需为<font color=\"red\">签署完成</font> 、<font color=\"red\">已解除</font>才能生成证书查看二维码/短链。</li>\n<li>3. 调用接口时,需确保接口调用身份拥有此合同的访问数据权限或为合同参与方。</li>\n<li>4. 通过扫码或者点击链接,用户无需登录或者鉴权即可查看对应合同的区块链存证证书,请妥善保管好二维码或链接。</li></ul>",
348
355
  "input": "CreateFlowBlockchainEvidenceUrlRequest",
@@ -4357,7 +4364,7 @@
4357
4364
  },
4358
4365
  {
4359
4366
  "disabled": false,
4360
- "document": "电子印章类型 , 可选类型如下: \n<ul><li>**OFFICIAL**: 公章</li>\n<li>**CONTRACT**: 合同专用章;</li>\n<li>**FINANCE**: 财务专用章;</li>\n<li>**PERSONNEL**: 人事专用章</li>\n<li>**INVOICE**: 发票专用章</li>\n</ul>\n\n注: `为空时查询所有类型的印章。`",
4367
+ "document": "电子印章类型 , 可选类型如下: <ul><li>**OFFICIAL**: 公章</li><li>**CONTRACT**: 合同专用章;</li><li>**FINANCE**: 财务专用章;</li><li>**PERSONNEL**: 人事专用章</li><li>**INVOICE**: 发票专用章</li><<li>**EMPLOYEE_QUALIFICATION_SEAL**: 员工执业章</li></ul>注: `为空时查询所有类型的印章。`",
4361
4368
  "example": "无",
4362
4369
  "member": "string",
4363
4370
  "name": "SealTypes",
@@ -6044,7 +6051,7 @@
6044
6051
  },
6045
6052
  {
6046
6053
  "disabled": false,
6047
- "document": "第三方平台子客的企业名称,请确认该企业名称与企业营业执照中注册的名称完全一致。\n<font color=\"red\">在测试环境联调的过程中,企业名称请使用以下名称 \n**子客测试专用企业1 - 子客测试专用企业9**</font>\n\n注:\n `1. 如果名称中包含英文括号(),请使用中文括号()代替。`\n `2、该名称需要与Agent.ProxyOrganizationOpenId相匹配, 企业激活后Agent.ProxyOrganizationOpenId会跟此企业名称一一绑定; 如果您的企业已经在认证授权中或者激活完成,这里修改子客企业名字将不会生效。 `",
6054
+ "document": "第三方平台子客的企业名称,请确认该企业名称与企业营业执照中注册的名称完全一致。\n<font color=\"red\">\n在测试环境联调的过程中,企业名称请统一加上“测试”二字,如:典子谦示例企业测试,否则将无法审核通过。\n企业名称请使用以下名称, 以下名称可以不用走收录。\n**子客测试专用企业1 - 子客测试专用企业9**</font>\n\n注:\n `1. 如果名称中包含英文括号(),请使用中文括号()代替。`\n `2、该名称需要与Agent.ProxyOrganizationOpenId相匹配, 企业激活后Agent.ProxyOrganizationOpenId会跟此企业名称一一绑定; 如果您的企业已经在认证授权中或者激活完成,这里修改子客企业名字将不会生效。 `",
6048
6055
  "example": "典子谦示例企业测试",
6049
6056
  "member": "string",
6050
6057
  "name": "ProxyOrganizationName",
@@ -6213,6 +6220,52 @@
6213
6220
  ],
6214
6221
  "type": "object"
6215
6222
  },
6223
+ "CreateEmployeeQualificationSealQrCodeRequest": {
6224
+ "document": "CreateEmployeeQualificationSealQrCode请求参数结构体",
6225
+ "members": [
6226
+ {
6227
+ "disabled": false,
6228
+ "document": "关于渠道应用的相关信息,包括渠道应用标识、第三方平台子客企业标识及第三方平台子客企业中的员工标识等内容,您可以参阅开发者中心所提供的 Agent 结构体以获取详细定义。此接口下面信息必填。<ul><li>渠道应用标识: Agent.AppId</li><li>第三方平台子客企业标识: Agent.ProxyOrganizationOpenId</li><li>第三方平台子客企业中的员工标识: Agent.ProxyOperator.OpenId</li></ul>第三方平台子客企业和员工必须已经经过实名认证",
6229
+ "example": "无",
6230
+ "member": "Agent",
6231
+ "name": "Agent",
6232
+ "required": true,
6233
+ "type": "object"
6234
+ },
6235
+ {
6236
+ "disabled": false,
6237
+ "document": "提示信息,扫码后此信息会展示给扫描用户,用来提示用户授权操作的目的",
6238
+ "example": "无",
6239
+ "member": "string",
6240
+ "name": "HintText",
6241
+ "required": false,
6242
+ "type": "string"
6243
+ }
6244
+ ],
6245
+ "type": "object"
6246
+ },
6247
+ "CreateEmployeeQualificationSealQrCodeResponse": {
6248
+ "document": "CreateEmployeeQualificationSealQrCode返回参数结构体",
6249
+ "members": [
6250
+ {
6251
+ "disabled": false,
6252
+ "document": "二维码图片的Base64 注: `此二维码的有效时间为7天,过期后需要重新生成新的二维码图片`",
6253
+ "example": "无",
6254
+ "member": "string",
6255
+ "name": "QrcodeBase64",
6256
+ "output_required": false,
6257
+ "type": "string",
6258
+ "value_allowed_null": false
6259
+ },
6260
+ {
6261
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
6262
+ "member": "string",
6263
+ "name": "RequestId",
6264
+ "type": "string"
6265
+ }
6266
+ ],
6267
+ "type": "object"
6268
+ },
6216
6269
  "CreateFlowBlockchainEvidenceUrlRequest": {
6217
6270
  "document": "CreateFlowBlockchainEvidenceUrl请求参数结构体",
6218
6271
  "members": [
@@ -8016,7 +8069,7 @@
8016
8069
  "members": [
8017
8070
  {
8018
8071
  "disabled": false,
8019
- "document": "扩展服务类型\n<ul>\n<li>AUTO_SIGN 企业自动签(自动签署)</li>\n<li> OVERSEA_SIGN 企业与港澳台居民签署合同</li>\n<li> MOBILE_CHECK_APPROVER 使用手机号验证签署方身份</li>\n<li> PAGING_SEAL 骑缝章</li>\n<li> DOWNLOAD_FLOW 授权渠道下载合同 </li>\n<li>AGE_LIMIT_EXPANSION 拓宽签署方年龄限制</li>\n<li>HIDE_OPERATOR_DISPLAY 隐藏合同经办人姓名</li>\n</ul>",
8072
+ "document": "扩展服务类型\n<ul>\n<li>AUTO_SIGN 企业自动签(自动签署)</li>\n<li> OVERSEA_SIGN 企业与港澳台居民签署合同</li>\n<li> MOBILE_CHECK_APPROVER 使用手机号验证签署方身份</li>\n<li> DOWNLOAD_FLOW 授权渠道下载合同 </li>\n<li>AGE_LIMIT_EXPANSION 拓宽签署方年龄限制</li>\n<li>HIDE_OPERATOR_DISPLAY 隐藏合同经办人姓名</li>\n</ul>",
8020
8073
  "example": "AUTO_SIGN",
8021
8074
  "member": "string",
8022
8075
  "name": "Type",
@@ -746,6 +746,14 @@
746
746
  "title": "生成到模板详情的控制台链接"
747
747
  }
748
748
  ],
749
+ "CreateEmployeeQualificationSealQrCode": [
750
+ {
751
+ "document": "企业需要员工授权执业章使用权限给企业时,调用接口产生二维码",
752
+ "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateEmployeeQualificationSealQrCode\n<公共请求参数>\n\n{\n \"Agent\": {\n \"AppId\": \"yDwfwUUgygormhg1UuS2eARxjMT0mxAw\",\n \"ProxyOrganizationOpenId\": \"org_zhangsan\",\n \"ProxyOperator\": {\n \"OpenId\": \"n02468\"\n }\n },\n \"HintText\": \"我是提示文字\"\n}",
753
+ "output": "{\n \"Response\": {\n \"QrcodeBase64\": \"/9ji1/Z**************/2Q==\",\n \"RequestId\": \"s1720524882444991481\"\n }\n}",
754
+ "title": "生成员工执业章授权二维码"
755
+ }
756
+ ],
749
757
  "CreateFlowBlockchainEvidenceUrl": [
750
758
  {
751
759
  "document": "拥有访问权限的员工生成合同区块链存证证书查看二维码/链接",
@@ -3761,6 +3761,58 @@ def doDescribeFirstLinkSession(args, parsed_globals):
3761
3761
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3762
3762
 
3763
3763
 
3764
+ def doDescribeTaskStatus(args, parsed_globals):
3765
+ g_param = parse_global_arg(parsed_globals)
3766
+
3767
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3768
+ cred = credential.CVMRoleCredential()
3769
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3770
+ cred = credential.STSAssumeRoleCredential(
3771
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3772
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3773
+ )
3774
+ 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):
3775
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3776
+ else:
3777
+ cred = credential.Credential(
3778
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3779
+ )
3780
+ http_profile = HttpProfile(
3781
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3782
+ reqMethod="POST",
3783
+ endpoint=g_param[OptionsDefine.Endpoint],
3784
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3785
+ )
3786
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3787
+ if g_param[OptionsDefine.Language]:
3788
+ profile.language = g_param[OptionsDefine.Language]
3789
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3790
+ client = mod.GaapClient(cred, g_param[OptionsDefine.Region], profile)
3791
+ client._sdkVersion += ("_CLI_" + __version__)
3792
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3793
+ model = models.DescribeTaskStatusRequest()
3794
+ model.from_json_string(json.dumps(args))
3795
+ start_time = time.time()
3796
+ while True:
3797
+ rsp = client.DescribeTaskStatus(model)
3798
+ result = rsp.to_json_string()
3799
+ try:
3800
+ json_obj = json.loads(result)
3801
+ except TypeError as e:
3802
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3803
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3804
+ break
3805
+ cur_time = time.time()
3806
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3807
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3808
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3809
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3810
+ else:
3811
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3812
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3813
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3814
+
3815
+
3764
3816
  def doAddRealServers(args, parsed_globals):
3765
3817
  g_param = parse_global_arg(parsed_globals)
3766
3818
 
@@ -5508,6 +5560,7 @@ ACTION_MAP = {
5508
5560
  "CreateDomain": doCreateDomain,
5509
5561
  "DescribeCertificateDetail": doDescribeCertificateDetail,
5510
5562
  "DescribeFirstLinkSession": doDescribeFirstLinkSession,
5563
+ "DescribeTaskStatus": doDescribeTaskStatus,
5511
5564
  "AddRealServers": doAddRealServers,
5512
5565
  "DisableGlobalDomain": doDisableGlobalDomain,
5513
5566
  "DescribeRegionAndPrice": doDescribeRegionAndPrice,
@@ -532,6 +532,13 @@
532
532
  "output": "DescribeTCPListenersResponse",
533
533
  "status": "online"
534
534
  },
535
+ "DescribeTaskStatus": {
536
+ "document": "查询异步任务执行状态",
537
+ "input": "DescribeTaskStatusRequest",
538
+ "name": "查询异步任务状态",
539
+ "output": "DescribeTaskStatusResponse",
540
+ "status": "online"
541
+ },
535
542
  "DescribeUDPListeners": {
536
543
  "document": "该接口(DescribeUDPListeners)用于查询单通道或者通道组下的UDP监听器信息",
537
544
  "input": "DescribeUDPListenersRequest",
@@ -6213,6 +6220,23 @@
6213
6220
  ],
6214
6221
  "type": "object"
6215
6222
  },
6223
+ "DescribeTaskStatusRequest": {
6224
+ "document": "DescribeTaskStatus请求参数结构体",
6225
+ "members": [],
6226
+ "type": "object"
6227
+ },
6228
+ "DescribeTaskStatusResponse": {
6229
+ "document": "DescribeTaskStatus返回参数结构体",
6230
+ "members": [
6231
+ {
6232
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
6233
+ "member": "string",
6234
+ "name": "RequestId",
6235
+ "type": "string"
6236
+ }
6237
+ ],
6238
+ "type": "object"
6239
+ },
6216
6240
  "DescribeUDPListenersRequest": {
6217
6241
  "document": "DescribeUDPListeners请求参数结构体",
6218
6242
  "members": [
@@ -656,6 +656,14 @@
656
656
  "title": "查询TCP监听器列表"
657
657
  }
658
658
  ],
659
+ "DescribeTaskStatus": [
660
+ {
661
+ "document": "查询异步任务执行状态",
662
+ "input": "POST / HTTP/1.1\nHost: gaap.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTaskStatus\n<公共请求参数>\n\n{}",
663
+ "output": "{\n \"Response\": {\n \"RequestId\": \"766d83c7-c0b1-4973-bdf3-effeeffa34d7\"\n }\n}",
664
+ "title": "查询异步任务执行状态"
665
+ }
666
+ ],
659
667
  "DescribeUDPListeners": [
660
668
  {
661
669
  "document": "查询UDP监听器列表",
@@ -7136,6 +7136,7 @@
7136
7136
  "example": "无",
7137
7137
  "member": "PullStreamTaskInfo",
7138
7138
  "name": "TaskInfos",
7139
+ "output_required": true,
7139
7140
  "type": "list",
7140
7141
  "value_allowed_null": false
7141
7142
  },
@@ -7145,6 +7146,7 @@
7145
7146
  "example": "1",
7146
7147
  "member": "uint64",
7147
7148
  "name": "PageNum",
7149
+ "output_required": true,
7148
7150
  "type": "int",
7149
7151
  "value_allowed_null": false
7150
7152
  },
@@ -7154,6 +7156,7 @@
7154
7156
  "example": "10",
7155
7157
  "member": "uint64",
7156
7158
  "name": "PageSize",
7159
+ "output_required": true,
7157
7160
  "type": "int",
7158
7161
  "value_allowed_null": false
7159
7162
  },
@@ -7163,6 +7166,7 @@
7163
7166
  "example": "1",
7164
7167
  "member": "uint64",
7165
7168
  "name": "TotalNum",
7169
+ "output_required": true,
7166
7170
  "type": "int",
7167
7171
  "value_allowed_null": false
7168
7172
  },
@@ -7172,6 +7176,7 @@
7172
7176
  "example": "1",
7173
7177
  "member": "uint64",
7174
7178
  "name": "TotalPage",
7179
+ "output_required": true,
7175
7180
  "type": "int",
7176
7181
  "value_allowed_null": false
7177
7182
  },
@@ -7181,6 +7186,7 @@
7181
7186
  "example": "20",
7182
7187
  "member": "uint64",
7183
7188
  "name": "LimitTaskNum",
7189
+ "output_required": true,
7184
7190
  "type": "int",
7185
7191
  "value_allowed_null": false
7186
7192
  },
@@ -636,7 +636,7 @@
636
636
  {
637
637
  "document": "查询直播拉流任务。",
638
638
  "input": "POST / HTTP/1.1\nHost: live.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeLivePullStreamTasks\n<公共请求参数>\n\n{\n \"TaskId\": \"123\"\n}",
639
- "output": "{\n \"Response\": {\n \"TaskInfos\": [\n {\n \"AppName\": \"live\",\n \"Region\": \"ap-beijing\",\n \"CallbackInfo\": \"\",\n \"CallbackEvents\": [\n \"TaskStart\",\n \"TaskExit\"\n ],\n \"CallbackUrl\": \"\",\n \"CreateBy\": \"yourname\",\n \"DomainName\": \"yourdomain.com\",\n \"EndTime\": \"2020-04-25T00:30:00Z\",\n \"ErrorInfo\": \"\",\n \"PushArgs\": \"txsecret=7cbb8f382a21e8d2f6cd8098100d3b8e&txtime=5ea0450d\",\n \"SourceType\": \"PullLivePushLive\",\n \"SourceUrls\": [\n \"http://yourdomain/live/test.flv\"\n ],\n \"StartTime\": \"2020-04-20T00:30:00Z\",\n \"Status\": \"enable\",\n \"StreamName\": \"teststream\",\n \"Comment\": \"abc\",\n \"TaskId\": \"10054\",\n \"UpdateBy\": \"\",\n \"UpdateTime\": \"2020-04-23T05:07:43Z\",\n \"CreateTime\": \"2020-04-20T05:07:43Z\",\n \"VodLoopTimes\": -1,\n \"VodRefreshType\": \"ImmediateNewSource\",\n \"VodLocalMode\": 0,\n \"BackupSourceType\": \"\",\n \"BackupSourceUrl\": \"\",\n \"WatermarkList\": [],\n \"RecentPullInfo\": {\n \"FileUrl\": \"http://yourdomain/live/test.flv\",\n \"OffsetTime\": 95,\n \"LoopedTimes\": 0,\n \"ReportTime\": \"2020-04-23T08:20:39Z\"\n }\n }\n ],\n \"PageNum\": 1,\n \"PageSize\": 10,\n \"TotalNum\": 1,\n \"TotalPage\": 1,\n \"LimitTaskNum\": 20,\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
639
+ "output": "{\n \"Response\": {\n \"TaskInfos\": [\n {\n \"AppName\": \"live\",\n \"Region\": \"ap-beijing\",\n \"CallbackInfo\": \"\",\n \"CallbackEvents\": [\n \"TaskStart\",\n \"TaskExit\"\n ],\n \"CallbackUrl\": \"\",\n \"CreateBy\": \"yourname\",\n \"DomainName\": \"yourdomain.com\",\n \"EndTime\": \"2020-04-25T00:30:00Z\",\n \"ErrorInfo\": \"\",\n \"BackupToUrl\": \"\",\n \"RecordTemplateId\": \"\",\n \"PushArgs\": \"txsecret=7cbb8f382a21e8d2f6cd8098100d3b8e&txtime=5ea0450d\",\n \"SourceType\": \"PullLivePushLive\",\n \"SourceUrls\": [\n \"http://yourdomain/live/test.flv\"\n ],\n \"StartTime\": \"2020-04-20T00:30:00Z\",\n \"Status\": \"enable\",\n \"StreamName\": \"teststream\",\n \"Comment\": \"abc\",\n \"TaskId\": \"10054\",\n \"UpdateBy\": \"\",\n \"UpdateTime\": \"2020-04-23T05:07:43Z\",\n \"CreateTime\": \"2020-04-20T05:07:43Z\",\n \"VodLoopTimes\": -1,\n \"VodRefreshType\": \"ImmediateNewSource\",\n \"VodLocalMode\": 0,\n \"BackupSourceType\": \"\",\n \"BackupSourceUrl\": \"\",\n \"WatermarkList\": [],\n \"RecentPullInfo\": {\n \"FileUrl\": \"http://yourdomain/live/test.flv\",\n \"OffsetTime\": 95,\n \"LoopedTimes\": 0,\n \"ReportTime\": \"2020-04-23T08:20:39Z\"\n }\n }\n ],\n \"PageNum\": 1,\n \"PageSize\": 10,\n \"TotalNum\": 1,\n \"TotalPage\": 1,\n \"LimitTaskNum\": 20,\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
640
640
  "title": "请求示例"
641
641
  }
642
642
  ],
@@ -3293,6 +3293,58 @@ def doDescribePrice(args, parsed_globals):
3293
3293
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3294
3294
 
3295
3295
 
3296
+ def doUpgradeHourDBInstance(args, parsed_globals):
3297
+ g_param = parse_global_arg(parsed_globals)
3298
+
3299
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3300
+ cred = credential.CVMRoleCredential()
3301
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3302
+ cred = credential.STSAssumeRoleCredential(
3303
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3304
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3305
+ )
3306
+ 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):
3307
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3308
+ else:
3309
+ cred = credential.Credential(
3310
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3311
+ )
3312
+ http_profile = HttpProfile(
3313
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3314
+ reqMethod="POST",
3315
+ endpoint=g_param[OptionsDefine.Endpoint],
3316
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3317
+ )
3318
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3319
+ if g_param[OptionsDefine.Language]:
3320
+ profile.language = g_param[OptionsDefine.Language]
3321
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3322
+ client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
3323
+ client._sdkVersion += ("_CLI_" + __version__)
3324
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3325
+ model = models.UpgradeHourDBInstanceRequest()
3326
+ model.from_json_string(json.dumps(args))
3327
+ start_time = time.time()
3328
+ while True:
3329
+ rsp = client.UpgradeHourDBInstance(model)
3330
+ result = rsp.to_json_string()
3331
+ try:
3332
+ json_obj = json.loads(result)
3333
+ except TypeError as e:
3334
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3335
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3336
+ break
3337
+ cur_time = time.time()
3338
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3339
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3340
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3341
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3342
+ else:
3343
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3344
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3345
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3346
+
3347
+
3296
3348
  def doDescribeDatabaseTable(args, parsed_globals):
3297
3349
  g_param = parse_global_arg(parsed_globals)
3298
3350
 
@@ -3835,6 +3887,7 @@ ACTION_MAP = {
3835
3887
  "ModifyInstanceVport": doModifyInstanceVport,
3836
3888
  "UpgradeDedicatedDBInstance": doUpgradeDedicatedDBInstance,
3837
3889
  "DescribePrice": doDescribePrice,
3890
+ "UpgradeHourDBInstance": doUpgradeHourDBInstance,
3838
3891
  "DescribeDatabaseTable": doDescribeDatabaseTable,
3839
3892
  "CancelDcnJob": doCancelDcnJob,
3840
3893
  "TerminateDedicatedDBInstance": doTerminateDedicatedDBInstance,
@@ -503,6 +503,13 @@
503
503
  "name": "升级独享云数据库实例",
504
504
  "output": "UpgradeDedicatedDBInstanceResponse",
505
505
  "status": "online"
506
+ },
507
+ "UpgradeHourDBInstance": {
508
+ "document": "升级MariaDB按量计费实例",
509
+ "input": "UpgradeHourDBInstanceRequest",
510
+ "name": "升级MariaDB按量计费实例",
511
+ "output": "UpgradeHourDBInstanceResponse",
512
+ "status": "online"
506
513
  }
507
514
  },
508
515
  "metadata": {
@@ -8578,6 +8585,87 @@
8578
8585
  ],
8579
8586
  "type": "object"
8580
8587
  },
8588
+ "UpgradeHourDBInstanceRequest": {
8589
+ "document": "UpgradeHourDBInstance请求参数结构体",
8590
+ "members": [
8591
+ {
8592
+ "disabled": false,
8593
+ "document": "实例ID",
8594
+ "example": "tdsql-cq3ndzu7",
8595
+ "member": "string",
8596
+ "name": "InstanceId",
8597
+ "required": true,
8598
+ "type": "string"
8599
+ },
8600
+ {
8601
+ "disabled": false,
8602
+ "document": "内存大小,单位:GB",
8603
+ "example": "2",
8604
+ "member": "int64",
8605
+ "name": "Memory",
8606
+ "required": true,
8607
+ "type": "int"
8608
+ },
8609
+ {
8610
+ "disabled": false,
8611
+ "document": "存储大小,单位:GB",
8612
+ "example": "10",
8613
+ "member": "int64",
8614
+ "name": "Storage",
8615
+ "required": true,
8616
+ "type": "int"
8617
+ },
8618
+ {
8619
+ "disabled": false,
8620
+ "document": "切换开始时间,格式如: \"2019-12-12 07:00:00\"。开始时间必须在当前时间一个小时以后,3天以内。",
8621
+ "example": "2019-12-12 07:00:00",
8622
+ "member": "datetime",
8623
+ "name": "SwitchStartTime",
8624
+ "required": false,
8625
+ "type": "string"
8626
+ },
8627
+ {
8628
+ "disabled": false,
8629
+ "document": "切换结束时间, 格式如: \"2019-12-12 07:15:00\",结束时间必须大于开始时间。",
8630
+ "example": "2019-12-12 07:15:00",
8631
+ "member": "datetime",
8632
+ "name": "SwitchEndTime",
8633
+ "required": false,
8634
+ "type": "string"
8635
+ },
8636
+ {
8637
+ "disabled": false,
8638
+ "document": "是否自动重试。 0:不自动重试 1:自动重试",
8639
+ "example": "1",
8640
+ "member": "int64",
8641
+ "name": "SwitchAutoRetry",
8642
+ "required": false,
8643
+ "type": "int"
8644
+ },
8645
+ {
8646
+ "disabled": false,
8647
+ "document": "变更部署时指定的新可用区列表,第1个为主可用区,其余为从可用区",
8648
+ "example": "[]",
8649
+ "member": "string",
8650
+ "name": "Zones",
8651
+ "required": false,
8652
+ "type": "list"
8653
+ }
8654
+ ],
8655
+ "type": "object"
8656
+ },
8657
+ "UpgradeHourDBInstanceResponse": {
8658
+ "document": "UpgradeHourDBInstance返回参数结构体",
8659
+ "members": [
8660
+ {
8661
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
8662
+ "member": "string",
8663
+ "name": "RequestId",
8664
+ "type": "string"
8665
+ }
8666
+ ],
8667
+ "type": "object"
8668
+ },
8581
8669
  "ViewPrivileges": {
8582
8670
  "document": "视图权限信息",
8583
8671
  "members": [
@@ -575,6 +575,14 @@
575
575
  "output": "{\n \"Response\": {\n \"RequestId\": \"14f6980a-7fe1-11ea-b896-525400542aa6\",\n \"FlowId\": 1122\n }\n}",
576
576
  "title": "无"
577
577
  }
578
+ ],
579
+ "UpgradeHourDBInstance": [
580
+ {
581
+ "document": "升级MariaDB按量计费实例",
582
+ "input": "https://mariadb.tencentcloudapi.com/?Action=UpgradeHourDBInstance\n&InstanceId=tdsql-cq3ndzu7\n&Memory=2\n&Storage=10\n&<公共请求参数>",
583
+ "output": "{\n \"Response\": {\n \"RequestId\": \"b3d8965f-5124-451d-be87-499ea75eb3a4\"\n }\n}",
584
+ "title": "升级MariaDB按量计费实例"
585
+ }
578
586
  ]
579
587
  },
580
588
  "version": "1.0"