tccli 3.0.1190.1__py2.py3-none-any.whl → 3.0.1192.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 (61) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/command.py +7 -1
  3. tccli/configure.py +11 -3
  4. tccli/loaders.py +43 -8
  5. tccli/oauth.py +115 -0
  6. tccli/plugin.py +30 -0
  7. tccli/plugins/__init__.py +0 -0
  8. tccli/plugins/auth/__init__.py +59 -0
  9. tccli/plugins/auth/browser_flow.py +88 -0
  10. tccli/plugins/auth/login.py +130 -0
  11. tccli/plugins/auth/logout.py +21 -0
  12. tccli/plugins/auth/texts.py +30 -0
  13. tccli/plugins/test/__init__.py +87 -0
  14. tccli/plugins/test/add.py +31 -0
  15. tccli/services/apm/v20210622/api.json +19 -0
  16. tccli/services/cam/cam_client.py +138 -32
  17. tccli/services/cam/v20190116/api.json +203 -0
  18. tccli/services/cam/v20190116/examples.json +16 -0
  19. tccli/services/cdb/v20170320/api.json +13 -4
  20. tccli/services/cfw/cfw_client.py +53 -0
  21. tccli/services/cfw/v20190904/api.json +473 -0
  22. tccli/services/cfw/v20190904/examples.json +8 -0
  23. tccli/services/ckafka/ckafka_client.py +53 -0
  24. tccli/services/ckafka/v20190819/api.json +80 -0
  25. tccli/services/ckafka/v20190819/examples.json +8 -0
  26. tccli/services/cls/v20201016/examples.json +1 -1
  27. tccli/services/dasb/dasb_client.py +53 -0
  28. tccli/services/dasb/v20191018/api.json +168 -0
  29. tccli/services/dasb/v20191018/examples.json +8 -0
  30. tccli/services/dlc/v20210125/api.json +298 -45
  31. tccli/services/dlc/v20210125/examples.json +21 -21
  32. tccli/services/dsgc/v20190723/api.json +13 -3
  33. tccli/services/emr/v20190103/api.json +8 -8
  34. tccli/services/ess/v20201111/api.json +49 -16
  35. tccli/services/ess/v20201111/examples.json +7 -1
  36. tccli/services/essbasic/v20210526/api.json +28 -1
  37. tccli/services/essbasic/v20210526/examples.json +43 -1
  38. tccli/services/irp/v20220805/api.json +11 -2
  39. tccli/services/lke/v20231130/api.json +82 -4
  40. tccli/services/mps/v20190612/api.json +126 -5
  41. tccli/services/ocr/v20181119/api.json +10 -0
  42. tccli/services/ocr/v20181119/examples.json +1 -1
  43. tccli/services/omics/v20221128/api.json +13 -2
  44. tccli/services/region/v20220627/api.json +11 -11
  45. tccli/services/region/v20220627/examples.json +1 -1
  46. tccli/services/tat/v20201028/api.json +10 -0
  47. tccli/services/tcb/v20180608/api.json +2 -2
  48. tccli/services/tdmq/v20200217/api.json +2 -2
  49. tccli/services/tdmq/v20200217/examples.json +2 -2
  50. tccli/services/tmt/v20180321/api.json +2 -2
  51. tccli/services/vdb/v20230616/api.json +38 -1
  52. tccli/services/vdb/v20230616/examples.json +2 -2
  53. tccli/services/vod/v20180717/api.json +30 -9
  54. tccli/services/vod/v20180717/examples.json +1 -1
  55. tccli/services/vpc/v20170312/api.json +3 -3
  56. tccli/services/wedata/v20210820/api.json +1 -1
  57. {tccli-3.0.1190.1.dist-info → tccli-3.0.1192.1.dist-info}/METADATA +2 -2
  58. {tccli-3.0.1190.1.dist-info → tccli-3.0.1192.1.dist-info}/RECORD +61 -51
  59. {tccli-3.0.1190.1.dist-info → tccli-3.0.1192.1.dist-info}/WHEEL +0 -0
  60. {tccli-3.0.1190.1.dist-info → tccli-3.0.1192.1.dist-info}/entry_points.txt +0 -0
  61. {tccli-3.0.1190.1.dist-info → tccli-3.0.1192.1.dist-info}/license_files/LICENSE +0 -0
@@ -140,6 +140,13 @@
140
140
  "output": "DeleteGroupResponse",
141
141
  "status": "online"
142
142
  },
143
+ "DeleteMessageReceiver": {
144
+ "document": "删除消息接收人",
145
+ "input": "DeleteMessageReceiverRequest",
146
+ "name": "删除消息接收人",
147
+ "output": "DeleteMessageReceiverResponse",
148
+ "status": "online"
149
+ },
143
150
  "DeleteOIDCConfig": {
144
151
  "document": "删除OIDC身份提供商",
145
152
  "input": "DeleteOIDCConfigRequest",
@@ -462,6 +469,13 @@
462
469
  "output": "ListPolicyVersionsResponse",
463
470
  "status": "online"
464
471
  },
472
+ "ListReceiver": {
473
+ "document": "获取消息接收人列表",
474
+ "input": "ListReceiverRequest",
475
+ "name": "获取消息接收人列表",
476
+ "output": "ListReceiverResponse",
477
+ "status": "online"
478
+ },
465
479
  "ListSAMLProviders": {
466
480
  "document": "查询SAML身份提供商列表",
467
481
  "input": "ListSAMLProvidersRequest",
@@ -2286,6 +2300,33 @@
2286
2300
  ],
2287
2301
  "type": "object"
2288
2302
  },
2303
+ "DeleteMessageReceiverRequest": {
2304
+ "document": "DeleteMessageReceiver请求参数结构体",
2305
+ "members": [
2306
+ {
2307
+ "disabled": false,
2308
+ "document": "消息接受者的名称",
2309
+ "example": "test",
2310
+ "member": "string",
2311
+ "name": "Name",
2312
+ "required": true,
2313
+ "type": "string"
2314
+ }
2315
+ ],
2316
+ "type": "object"
2317
+ },
2318
+ "DeleteMessageReceiverResponse": {
2319
+ "document": "DeleteMessageReceiver返回参数结构体",
2320
+ "members": [
2321
+ {
2322
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
2323
+ "member": "string",
2324
+ "name": "RequestId",
2325
+ "type": "string"
2326
+ }
2327
+ ],
2328
+ "type": "object"
2329
+ },
2289
2330
  "DeleteOIDCConfigRequest": {
2290
2331
  "document": "DeleteOIDCConfig请求参数结构体",
2291
2332
  "members": [
@@ -5276,6 +5317,62 @@
5276
5317
  ],
5277
5318
  "type": "object"
5278
5319
  },
5320
+ "ListReceiverRequest": {
5321
+ "document": "ListReceiver请求参数结构体",
5322
+ "members": [
5323
+ {
5324
+ "disabled": false,
5325
+ "document": "分页偏移量",
5326
+ "example": "0",
5327
+ "member": "uint64",
5328
+ "name": "Offset",
5329
+ "required": false,
5330
+ "type": "int"
5331
+ },
5332
+ {
5333
+ "disabled": false,
5334
+ "document": "分页限制数目",
5335
+ "example": "12",
5336
+ "member": "uint64",
5337
+ "name": "Limit",
5338
+ "required": false,
5339
+ "type": "int"
5340
+ }
5341
+ ],
5342
+ "type": "object"
5343
+ },
5344
+ "ListReceiverResponse": {
5345
+ "document": "ListReceiver返回参数结构体",
5346
+ "members": [
5347
+ {
5348
+ "disabled": false,
5349
+ "document": "总数目",
5350
+ "example": "12",
5351
+ "member": "int64",
5352
+ "name": "TotalCount",
5353
+ "output_required": true,
5354
+ "type": "int",
5355
+ "value_allowed_null": false
5356
+ },
5357
+ {
5358
+ "disabled": false,
5359
+ "document": "联系人列表",
5360
+ "example": "[{\"Uid\":1001892,\"Name\":\"nick\",\"Remark\":\"\",\"PhoneNumber\":\"+86 186****3509\",\"PhoneFlag\":1,\"Email\":\"2054****@qq.com\",\"EmailFlag\":1,\"IsReceiverOwner\":1}]",
5361
+ "member": "Receiver",
5362
+ "name": "Receivers",
5363
+ "output_required": true,
5364
+ "type": "list",
5365
+ "value_allowed_null": false
5366
+ },
5367
+ {
5368
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
5369
+ "member": "string",
5370
+ "name": "RequestId",
5371
+ "type": "string"
5372
+ }
5373
+ ],
5374
+ "type": "object"
5375
+ },
5279
5376
  "ListSAMLProvidersRequest": {
5280
5377
  "document": "ListSAMLProviders请求参数结构体",
5281
5378
  "members": [],
@@ -5879,6 +5976,112 @@
5879
5976
  ],
5880
5977
  "type": "object"
5881
5978
  },
5979
+ "Receiver": {
5980
+ "document": "消息接收人信息",
5981
+ "members": [
5982
+ {
5983
+ "disabled": false,
5984
+ "document": "id",
5985
+ "example": "",
5986
+ "member": "uint64",
5987
+ "name": "Uid",
5988
+ "required": true,
5989
+ "type": "int",
5990
+ "value_allowed_null": false
5991
+ },
5992
+ {
5993
+ "disabled": false,
5994
+ "document": "名字",
5995
+ "example": "",
5996
+ "member": "string",
5997
+ "name": "Name",
5998
+ "required": true,
5999
+ "type": "string",
6000
+ "value_allowed_null": false
6001
+ },
6002
+ {
6003
+ "disabled": false,
6004
+ "document": "备注\n注意:此字段可能返回 null,表示取不到有效值。",
6005
+ "example": "",
6006
+ "member": "string",
6007
+ "name": "Remark",
6008
+ "required": true,
6009
+ "type": "string",
6010
+ "value_allowed_null": true
6011
+ },
6012
+ {
6013
+ "disabled": false,
6014
+ "document": "手机号码",
6015
+ "example": "",
6016
+ "member": "string",
6017
+ "name": "PhoneNumber",
6018
+ "required": true,
6019
+ "type": "string",
6020
+ "value_allowed_null": false
6021
+ },
6022
+ {
6023
+ "disabled": false,
6024
+ "document": "手机号码是否验证",
6025
+ "example": "",
6026
+ "member": "int64",
6027
+ "name": "PhoneFlag",
6028
+ "required": true,
6029
+ "type": "int",
6030
+ "value_allowed_null": false
6031
+ },
6032
+ {
6033
+ "disabled": false,
6034
+ "document": "邮箱",
6035
+ "example": "",
6036
+ "member": "string",
6037
+ "name": "Email",
6038
+ "required": true,
6039
+ "type": "string",
6040
+ "value_allowed_null": false
6041
+ },
6042
+ {
6043
+ "disabled": false,
6044
+ "document": "邮箱是否验证",
6045
+ "example": "",
6046
+ "member": "int64",
6047
+ "name": "EmailFlag",
6048
+ "required": true,
6049
+ "type": "int",
6050
+ "value_allowed_null": false
6051
+ },
6052
+ {
6053
+ "disabled": false,
6054
+ "document": "是否主联系人",
6055
+ "example": "",
6056
+ "member": "int64",
6057
+ "name": "IsReceiverOwner",
6058
+ "required": true,
6059
+ "type": "int",
6060
+ "value_allowed_null": false
6061
+ },
6062
+ {
6063
+ "disabled": false,
6064
+ "document": "是否允许微信接收通知\n注意:此字段可能返回 null,表示取不到有效值。",
6065
+ "example": "",
6066
+ "member": "int64",
6067
+ "name": "WechatFlag",
6068
+ "required": true,
6069
+ "type": "int",
6070
+ "value_allowed_null": true
6071
+ },
6072
+ {
6073
+ "disabled": false,
6074
+ "document": "账号uin\n注意:此字段可能返回 null,表示取不到有效值。",
6075
+ "example": "",
6076
+ "member": "int64",
6077
+ "name": "Uin",
6078
+ "required": true,
6079
+ "type": "int",
6080
+ "value_allowed_null": true
6081
+ }
6082
+ ],
6083
+ "usage": "out"
6084
+ },
5882
6085
  "RemoveUserFromGroupRequest": {
5883
6086
  "document": "RemoveUserFromGroup请求参数结构体",
5884
6087
  "members": [
@@ -160,6 +160,14 @@
160
160
  "title": "删除用户组"
161
161
  }
162
162
  ],
163
+ "DeleteMessageReceiver": [
164
+ {
165
+ "document": "删除消息接收人",
166
+ "input": "POST / HTTP/1.1\nHost: cam.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteMessageReceiver\n<公共请求参数>\n\n{\n \"Name\": \"test\"\n}",
167
+ "output": "{\n \"Response\": {\n \"RequestId\": \"af3a7188-5b3e-41a6-b489-8443e5816494\"\n }\n}",
168
+ "title": "删除消息接收人"
169
+ }
170
+ ],
163
171
  "DeleteOIDCConfig": [
164
172
  {
165
173
  "document": "",
@@ -540,6 +548,14 @@
540
548
  "title": "获取策略版本列表"
541
549
  }
542
550
  ],
551
+ "ListReceiver": [
552
+ {
553
+ "document": "",
554
+ "input": "https://cam.tencentcloudapi.com/?Action=ListReceiver\r\nOffset=0&Limit=10\r\n&<公共请求参数>",
555
+ "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"Receivers\": [\n {\n \"Uid\": 1001892,\n \"Name\": \"nick\",\n \"Remark\": \"\",\n \"PhoneNumber\": \"+86 186****3509\",\n \"PhoneFlag\": 1,\n \"Email\": \"2054****@qq.com\",\n \"EmailFlag\": 1,\n \"IsReceiverOwner\": 1\n }\n ],\n \"RequestId\": \"9a9d4601-5f14-4293-b314-2319ab9f5450\"\n }\n}",
556
+ "title": "获取消息接收人列表"
557
+ }
558
+ ],
543
559
  "ListSAMLProviders": [
544
560
  {
545
561
  "document": "查询身份提供商列表",
@@ -12123,7 +12123,7 @@
12123
12123
  "members": [
12124
12124
  {
12125
12125
  "disabled": false,
12126
- "document": "实例 ID 。只读组 ID为空时必填。",
12126
+ "document": "实例 ID。\n说明:实例 ID 和实例组 ID 两个参数选其一填写即可。若要查询双节点、三节点实例 SSL 开通情况,请填写实例 ID 参数进行查询。单节点(云盘)、集群版实例不支持开启 SSL,因此不支持查询。",
12127
12127
  "example": "cdb-test",
12128
12128
  "member": "string",
12129
12129
  "name": "InstanceId",
@@ -12132,7 +12132,7 @@
12132
12132
  },
12133
12133
  {
12134
12134
  "disabled": false,
12135
- "document": "只读组 ID。实例 ID为空时必填。",
12135
+ "document": "只读组 ID。\n说明:实例 ID 和实例组 ID 两个参数选其一填写即可。若要查询只读实例或只读组 SSL 开通情况,请填写 RoGroupId 参数,并注意填写的都是只读组 ID。单节点(云盘)、集群版实例不支持开启 SSL,因此不支持查询。",
12136
12136
  "example": "cdbrg-test",
12137
12137
  "member": "string",
12138
12138
  "name": "RoGroupId",
@@ -12151,7 +12151,7 @@
12151
12151
  "example": "ON",
12152
12152
  "member": "string",
12153
12153
  "name": "Status",
12154
- "required": true,
12154
+ "output_required": true,
12155
12155
  "type": "string",
12156
12156
  "value_allowed_null": false
12157
12157
  },
@@ -12161,7 +12161,7 @@
12161
12161
  "example": "http://testdownload.url",
12162
12162
  "member": "string",
12163
12163
  "name": "Url",
12164
- "required": true,
12164
+ "output_required": true,
12165
12165
  "type": "string",
12166
12166
  "value_allowed_null": false
12167
12167
  },
@@ -12275,6 +12275,15 @@
12275
12275
  "name": "InstType",
12276
12276
  "required": false,
12277
12277
  "type": "string"
12278
+ },
12279
+ {
12280
+ "disabled": false,
12281
+ "document": "节点ID",
12282
+ "example": "dbn-j57njp5s",
12283
+ "member": "string",
12284
+ "name": "OpResourceId",
12285
+ "required": false,
12286
+ "type": "string"
12278
12287
  }
12279
12288
  ],
12280
12289
  "type": "object"
@@ -4177,6 +4177,58 @@ def doModifyAclRule(args, parsed_globals):
4177
4177
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4178
4178
 
4179
4179
 
4180
+ def doDescribeEnterpriseSecurityGroupRuleList(args, parsed_globals):
4181
+ g_param = parse_global_arg(parsed_globals)
4182
+
4183
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4184
+ cred = credential.CVMRoleCredential()
4185
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4186
+ cred = credential.STSAssumeRoleCredential(
4187
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4188
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4189
+ )
4190
+ 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):
4191
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4192
+ else:
4193
+ cred = credential.Credential(
4194
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4195
+ )
4196
+ http_profile = HttpProfile(
4197
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4198
+ reqMethod="POST",
4199
+ endpoint=g_param[OptionsDefine.Endpoint],
4200
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4201
+ )
4202
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4203
+ if g_param[OptionsDefine.Language]:
4204
+ profile.language = g_param[OptionsDefine.Language]
4205
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4206
+ client = mod.CfwClient(cred, g_param[OptionsDefine.Region], profile)
4207
+ client._sdkVersion += ("_CLI_" + __version__)
4208
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4209
+ model = models.DescribeEnterpriseSecurityGroupRuleListRequest()
4210
+ model.from_json_string(json.dumps(args))
4211
+ start_time = time.time()
4212
+ while True:
4213
+ rsp = client.DescribeEnterpriseSecurityGroupRuleList(model)
4214
+ result = rsp.to_json_string()
4215
+ try:
4216
+ json_obj = json.loads(result)
4217
+ except TypeError as e:
4218
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4219
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4220
+ break
4221
+ cur_time = time.time()
4222
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4223
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4224
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4225
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4226
+ else:
4227
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4228
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4229
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4230
+
4231
+
4180
4232
  def doDescribeCfwEips(args, parsed_globals):
4181
4233
  g_param = parse_global_arg(parsed_globals)
4182
4234
 
@@ -6036,6 +6088,7 @@ ACTION_MAP = {
6036
6088
  "SetNatFwEip": doSetNatFwEip,
6037
6089
  "CreateAlertCenterRule": doCreateAlertCenterRule,
6038
6090
  "ModifyAclRule": doModifyAclRule,
6091
+ "DescribeEnterpriseSecurityGroupRuleList": doDescribeEnterpriseSecurityGroupRuleList,
6039
6092
  "DescribeCfwEips": doDescribeCfwEips,
6040
6093
  "DescribeBlockIgnoreList": doDescribeBlockIgnoreList,
6041
6094
  "RemoveNatAcRule": doRemoveNatAcRule,