tccli 3.0.1171.1__py2.py3-none-any.whl → 3.0.1173.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 (37) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/billing/v20180709/api.json +125 -5
  3. tccli/services/dlc/v20210125/api.json +137 -19
  4. tccli/services/dlc/v20210125/examples.json +6 -6
  5. tccli/services/es/v20180416/api.json +89 -2
  6. tccli/services/ess/ess_client.py +110 -4
  7. tccli/services/ess/v20201111/api.json +239 -0
  8. tccli/services/ess/v20201111/examples.json +16 -0
  9. tccli/services/essbasic/essbasic_client.py +67 -14
  10. tccli/services/essbasic/v20210526/api.json +103 -0
  11. tccli/services/essbasic/v20210526/examples.json +8 -0
  12. tccli/services/faceid/v20180301/api.json +2 -2
  13. tccli/services/goosefs/v20220519/api.json +56 -11
  14. tccli/services/hunyuan/v20230901/api.json +9 -0
  15. tccli/services/iss/v20230517/api.json +58 -0
  16. tccli/services/iss/v20230517/examples.json +13 -7
  17. tccli/services/mna/mna_client.py +53 -0
  18. tccli/services/mna/v20210119/api.json +80 -0
  19. tccli/services/mna/v20210119/examples.json +8 -0
  20. tccli/services/mongodb/v20190725/api.json +57 -57
  21. tccli/services/mongodb/v20190725/examples.json +2 -2
  22. tccli/services/ms/v20180408/api.json +46 -46
  23. tccli/services/ocr/v20181119/api.json +1 -1
  24. tccli/services/organization/organization_client.py +2837 -293
  25. tccli/services/organization/v20210331/api.json +7182 -1735
  26. tccli/services/organization/v20210331/examples.json +384 -0
  27. tccli/services/tat/tat_client.py +53 -0
  28. tccli/services/tat/v20201028/api.json +149 -5
  29. tccli/services/tat/v20201028/examples.json +8 -0
  30. tccli/services/teo/v20220901/api.json +2 -2
  31. tccli/services/trocket/v20230308/api.json +65 -12
  32. tccli/services/trtc/v20190722/api.json +22 -0
  33. {tccli-3.0.1171.1.dist-info → tccli-3.0.1173.1.dist-info}/METADATA +2 -2
  34. {tccli-3.0.1171.1.dist-info → tccli-3.0.1173.1.dist-info}/RECORD +37 -37
  35. {tccli-3.0.1171.1.dist-info → tccli-3.0.1173.1.dist-info}/WHEEL +0 -0
  36. {tccli-3.0.1171.1.dist-info → tccli-3.0.1173.1.dist-info}/entry_points.txt +0 -0
  37. {tccli-3.0.1171.1.dist-info → tccli-3.0.1173.1.dist-info}/license_files/LICENSE +0 -0
@@ -405,7 +405,7 @@
405
405
  "example": "10.0.1.2",
406
406
  "member": "string",
407
407
  "name": "ClientNodeIp",
408
- "required": true,
408
+ "output_required": true,
409
409
  "type": "string",
410
410
  "value_allowed_null": false
411
411
  },
@@ -415,7 +415,7 @@
415
415
  "example": "active",
416
416
  "member": "string",
417
417
  "name": "Status",
418
- "required": true,
418
+ "output_required": true,
419
419
  "type": "string",
420
420
  "value_allowed_null": false
421
421
  },
@@ -425,9 +425,49 @@
425
425
  "example": "extend",
426
426
  "member": "string",
427
427
  "name": "ClientType",
428
- "required": true,
428
+ "output_required": true,
429
+ "type": "string",
430
+ "value_allowed_null": false
431
+ },
432
+ {
433
+ "disabled": false,
434
+ "document": "节点所属vpcid\t",
435
+ "example": "vpc-5ke3uoww",
436
+ "member": "string",
437
+ "name": "VpcId",
438
+ "output_required": true,
429
439
  "type": "string",
430
440
  "value_allowed_null": false
441
+ },
442
+ {
443
+ "disabled": false,
444
+ "document": "节点所属子网id",
445
+ "example": "subnet-ihijdp5h",
446
+ "member": "string",
447
+ "name": "SubnetId",
448
+ "output_required": true,
449
+ "type": "string",
450
+ "value_allowed_null": false
451
+ },
452
+ {
453
+ "disabled": false,
454
+ "document": "cvmId",
455
+ "example": "ins-m1r9uwdp\t",
456
+ "member": "string",
457
+ "name": "InstanceId",
458
+ "output_required": true,
459
+ "type": "string",
460
+ "value_allowed_null": false
461
+ },
462
+ {
463
+ "disabled": false,
464
+ "document": "自定义挂载点\n注意:此字段可能返回 null,表示取不到有效值。",
465
+ "example": "/test",
466
+ "member": "string",
467
+ "name": "MountPoint",
468
+ "output_required": false,
469
+ "type": "string",
470
+ "value_allowed_null": true
431
471
  }
432
472
  ],
433
473
  "usage": "out"
@@ -1417,8 +1457,7 @@
1417
1457
  "member": "string",
1418
1458
  "name": "InstanceId",
1419
1459
  "required": false,
1420
- "type": "string",
1421
- "value_allowed_null": false
1460
+ "type": "string"
1422
1461
  },
1423
1462
  {
1424
1463
  "disabled": false,
@@ -1427,8 +1466,7 @@
1427
1466
  "member": "string",
1428
1467
  "name": "VpcId",
1429
1468
  "required": false,
1430
- "type": "string",
1431
- "value_allowed_null": true
1469
+ "type": "string"
1432
1470
  },
1433
1471
  {
1434
1472
  "disabled": false,
@@ -1437,8 +1475,7 @@
1437
1475
  "member": "string",
1438
1476
  "name": "SubnetId",
1439
1477
  "required": false,
1440
- "type": "string",
1441
- "value_allowed_null": true
1478
+ "type": "string"
1442
1479
  },
1443
1480
  {
1444
1481
  "disabled": false,
@@ -1447,8 +1484,16 @@
1447
1484
  "member": "string",
1448
1485
  "name": "LinuxClientNodeIp",
1449
1486
  "required": false,
1450
- "type": "string",
1451
- "value_allowed_null": true
1487
+ "type": "string"
1488
+ },
1489
+ {
1490
+ "disabled": false,
1491
+ "document": "自定义挂载点",
1492
+ "example": "/test",
1493
+ "member": "string",
1494
+ "name": "MountPoint",
1495
+ "required": false,
1496
+ "type": "string"
1452
1497
  }
1453
1498
  ],
1454
1499
  "usage": "in"
@@ -201,6 +201,15 @@
201
201
  "name": "Citation",
202
202
  "required": false,
203
203
  "type": "bool"
204
+ },
205
+ {
206
+ "disabled": false,
207
+ "document": "是否开启极速版搜索,默认false,不开启;在开启且命中搜索时,会启用极速版搜索,流式输出首字返回更快。",
208
+ "example": "false",
209
+ "member": "bool",
210
+ "name": "EnableSpeedSearch",
211
+ "required": false,
212
+ "type": "bool"
204
213
  }
205
214
  ],
206
215
  "type": "object"
@@ -2248,6 +2248,24 @@
2248
2248
  "name": "SNCode",
2249
2249
  "required": false,
2250
2250
  "type": "string"
2251
+ },
2252
+ {
2253
+ "disabled": false,
2254
+ "document": "RTMP推流地址自定义AppName(仅RTMP需要,支持英文、数字组合限制32个字符内)",
2255
+ "example": "live",
2256
+ "member": "string",
2257
+ "name": "AppName",
2258
+ "required": false,
2259
+ "type": "string"
2260
+ },
2261
+ {
2262
+ "disabled": false,
2263
+ "document": "RTMP推流地址自定义StreamName(仅RTMP需要,支持英文、数字组合限制32个字符内)",
2264
+ "example": "00cuDZBadN",
2265
+ "member": "string",
2266
+ "name": "StreamName",
2267
+ "required": false,
2268
+ "type": "string"
2251
2269
  }
2252
2270
  ],
2253
2271
  "type": "object"
@@ -3444,6 +3462,15 @@
3444
3462
  "name": "ClusterId",
3445
3463
  "required": true,
3446
3464
  "type": "string"
3465
+ },
3466
+ {
3467
+ "disabled": false,
3468
+ "document": "域名类型,0:拉流域名 1:推流域名",
3469
+ "example": "1",
3470
+ "member": "int64",
3471
+ "name": "DomainType",
3472
+ "required": false,
3473
+ "type": "int"
3447
3474
  }
3448
3475
  ],
3449
3476
  "type": "object"
@@ -3895,6 +3922,26 @@
3895
3922
  "output_required": false,
3896
3923
  "type": "int",
3897
3924
  "value_allowed_null": true
3925
+ },
3926
+ {
3927
+ "disabled": false,
3928
+ "document": "RTMP推流地址自定义appName\n注意:此字段可能返回 null,表示取不到有效值。",
3929
+ "example": "live",
3930
+ "member": "string",
3931
+ "name": "AppName",
3932
+ "output_required": false,
3933
+ "type": "string",
3934
+ "value_allowed_null": true
3935
+ },
3936
+ {
3937
+ "disabled": false,
3938
+ "document": "RTMP推流地址自定义streamName\n注意:此字段可能返回 null,表示取不到有效值。",
3939
+ "example": "00cuDZBadN",
3940
+ "member": "string",
3941
+ "name": "StreamName",
3942
+ "output_required": false,
3943
+ "type": "string",
3944
+ "value_allowed_null": true
3898
3945
  }
3899
3946
  ],
3900
3947
  "usage": "out"
@@ -4107,6 +4154,16 @@
4107
4154
  "output_required": false,
4108
4155
  "type": "string",
4109
4156
  "value_allowed_null": true
4157
+ },
4158
+ {
4159
+ "disabled": false,
4160
+ "document": "域名类型 0:拉流域名 1:推流域名\n注意:此字段可能返回 null,表示取不到有效值。",
4161
+ "example": "0",
4162
+ "member": "int64",
4163
+ "name": "DomainType",
4164
+ "output_required": false,
4165
+ "type": "int",
4166
+ "value_allowed_null": true
4110
4167
  }
4111
4168
  ],
4112
4169
  "usage": "out"
@@ -4188,6 +4245,7 @@
4188
4245
  "example": "无",
4189
4246
  "member": "DescribeDomainData",
4190
4247
  "name": "Data",
4248
+ "output_required": true,
4191
4249
  "type": "list",
4192
4250
  "value_allowed_null": false
4193
4251
  },
@@ -85,13 +85,13 @@
85
85
  "AddUserDevice": [
86
86
  {
87
87
  "document": " ",
88
- "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddUserDevice\n<公共请求参数>\n\n{\n \"Name\": \"rtmp10087\",\n \"AccessProtocol\": 1,\n \"Type\": 1,\n \"OrganizationId\": \"192\",\n \"ClusterId\": \"4169d92e-60ad-4c16-ac7e-d313abdd0790\"\n}",
88
+ "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddUserDevice\n<公共请求参数>\n\n{\n \"Name\": \"rtmp10087\",\n \"AccessProtocol\": 1,\n \"Type\": 1,\n \"OrganizationId\": \"192\",\n \"ClusterId\": \"4169d92e-****-****-****-************\"\n}",
89
89
  "output": "{\n \"Response\": {\n \"Data\": {\n \"AccessProtocol\": 1,\n \"AppId\": 1300000000,\n \"ClusterId\": \"4169d92e-****-4c16-****-d313****0790\",\n \"ClusterName\": \"上海一区\",\n \"Code\": \"0******Ofl\",\n \"Description\": \"\",\n \"GatewayId\": \"\",\n \"DeviceId\": \"********-53e4-****-a16e-*************\",\n \"Ip\": \"\",\n \"Name\": \"rtmp10087\",\n \"OrganizationId\": 1000192,\n \"Password\": \"\",\n \"Port\": 0,\n \"TransportProtocol\": 0,\n \"Type\": 1,\n \"Username\": \"\",\n \"ProtocolType\": 1,\n \"Status\": 1\n },\n \"RequestId\": \"6836e76d-8e7d-48d3-98c2-bc0df3bf23c2\"\n }\n}",
90
90
  "title": "rtmp成功"
91
91
  },
92
92
  {
93
93
  "document": " ",
94
- "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddUserDevice\n<公共请求参数>\n\n{\n \"Name\": \"rtmp10086\",\n \"AccessProtocol\": 1,\n \"Type\": 2,\n \"OrganizationId\": \"10092\",\n \"ClusterId\": \"12345678-abcd-efgh-ijkl-1234567890abcd\"\n}",
94
+ "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddUserDevice\n<公共请求参数>\n\n{\n \"Name\": \"rtmp10086\",\n \"AccessProtocol\": 1,\n \"Type\": 2,\n \"OrganizationId\": \"10092\",\n \"ClusterId\": \"12345678-****-****-****-************\"\n}",
95
95
  "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"InvalidParameterValue\",\n \"Message\": \"无效的参数\"\n },\n \"RequestId\": \"1647459e-2715-4adb-a074-0c3d4df7d6a4\"\n }\n}",
96
96
  "title": "设备类型错误"
97
97
  },
@@ -100,6 +100,12 @@
100
100
  "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddUserDevice\n<公共请求参数>\n\n{\n \"Name\": \"rtmp10086\",\n \"AccessProtocol\": 1,\n \"Type\": 2,\n \"OrganizationId\": \"10092\",\n \"ClusterId\": \"********-60ad-*****-ac7e-d******dd0790\"\n}",
101
101
  "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"InvalidParameterValue.InvalidDeviceType\",\n \"Message\": \"无效的设备类型\"\n },\n \"RequestId\": \"d4a82b07-08a2-47ba-8f22-04ce429a0dcd\"\n }\n}",
102
102
  "title": "无效的设备类型"
103
+ },
104
+ {
105
+ "document": "成功",
106
+ "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddUserDevice\n<公共请求参数>\n\n{\n \"Name\": \"testrtmp\",\n \"AccessProtocol\": 1,\n \"Type\": 1,\n \"OrganizationId\": \"189\",\n \"ClusterId\": \"4169d92e-****-****-****-************\",\n \"TransportProtocol\": 0,\n \"Password\": \"123\",\n \"ProtocolType\": 0,\n \"AppName\": \"testapp\",\n \"StreamName\": \"teststream\"\n}",
107
+ "output": "{\n \"Response\": {\n \"Data\": {\n \"AccessProtocol\": 1,\n \"AppId\": 1300056079,\n \"ClusterId\": \"4169d92e-****-****-****-************\",\n \"ClusterName\": \"上海一区\",\n \"Code\": \"0HQq******\",\n \"Description\": \"\",\n \"DeviceId\": \"f1f9baae-****-****-****-************\",\n \"GatewayId\": \"\",\n \"Ip\": \"\",\n \"Name\": \"testrtmp\",\n \"OrganizationId\": 189,\n \"Password\": \"123\",\n \"Port\": 0,\n \"ProtocolType\": 0,\n \"Status\": 0,\n \"TransportProtocol\": 0,\n \"Type\": 1,\n \"Username\": \"\"\n },\n \"RequestId\": \"56d8591d-85cb-498d-a5b6-52133305e69c\"\n }\n}",
108
+ "title": "success"
103
109
  }
104
110
  ],
105
111
  "BatchOperateDevice": [
@@ -299,7 +305,7 @@
299
305
  "DescribeCNAME": [
300
306
  {
301
307
  "document": " ",
302
- "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCNAME\n<公共请求参数>\n\n{\n \"ClusterId\": \"********-****-****-****-************\"\n}",
308
+ "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCNAME\n<公共请求参数>\n\n{\n \"ClusterId\": \"********-****-****-****-************\",\n \"DomainType\": 0\n}",
303
309
  "output": "{\n \"Response\": {\n \"Data\": \"****************.play-ivc.ap-shanghai.tencentivc.cn\",\n \"RequestId\": \"91297e34-b7bc-4d90-9c14-20bcd08f0db4\"\n }\n}",
304
310
  "title": "成功"
305
311
  }
@@ -338,7 +344,7 @@
338
344
  {
339
345
  "document": " ",
340
346
  "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDomain\n<公共请求参数>\n\n{}",
341
- "output": "{\n \"Response\": {\n \"Data\": [\n {\n \"AppId\": 1300000000,\n \"ClusterId\": \"********-****-****-****-**********\",\n \"ClusterName\": \"上海一区\",\n \"HaveCert\": 0,\n \"Id\": \"********-****-****-****-**********\",\n \"InternalDomain\": \"******************************.play-ivc.tencentivc.cn\",\n \"PlayDomain\": \"******.com.cn\"\n }\n ],\n \"RequestId\": \"7c69cd07-ee8e-4682-ab63-64a2e94d24f9\"\n }\n}",
347
+ "output": "{\n \"Response\": {\n \"Data\": [\n {\n \"AppId\": 1300000000,\n \"ClusterId\": \"********-****-****-****-**********\",\n \"ClusterName\": \"上海一区\",\n \"HaveCert\": 0,\n \"Id\": \"********-****-****-****-**********\",\n \"InternalDomain\": \"******************************.play-ivc.tencentivc.cn\",\n \"PlayDomain\": \"******.com.cn\",\n \"DomainType\": 0\n }\n ],\n \"RequestId\": \"7c69cd07-ee8e-4682-ab63-64a2e94d24f9\"\n }\n}",
342
348
  "title": "成功"
343
349
  }
344
350
  ],
@@ -491,8 +497,8 @@
491
497
  "DescribeUserDevice": [
492
498
  {
493
499
  "document": "ok",
494
- "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUserDevice\n<公共请求参数>\n\n{\n \"DeviceId\": \"da238a8c-****-4a5b-****-ddba25945b48\"\n}",
495
- "output": "{\n \"Response\": {\n \"Data\": {\n \"AccessProtocol\": 1,\n \"ClusterId\": \"12345678-abcd-efgh-ijkl-1234567890abcd\",\n \"ClusterName\": \"\",\n \"Code\": \"2*****vkVe\",\n \"Description\": \"\",\n \"GatewayId\": \"\",\n \"GatewayName\": \"\",\n \"DeviceId\": \"12345678-abcd-efgh-ijkl-1234567890abcd\",\n \"Ip\": \"\",\n \"Manufacturer\": \"\",\n \"Name\": \"iss-qta-dont-delete\",\n \"OrganizationId\": \"22\",\n \"Password\": \"\",\n \"Port\": 0,\n \"ProtocolType\": 0,\n \"ProtocolTypeName\": \"\",\n \"PushStreamUrl\": \"rtmp://81.**.54.**/live/2*****4vkVe\",\n \"Region\": \"\",\n \"SipDomain\": \"\",\n \"SipId\": \"\",\n \"SipIp\": \"\",\n \"SipPort\": 0,\n \"Status\": 0,\n \"TransportProtocol\": 0,\n \"Type\": 1,\n \"Username\": \"\"\n },\n \"RequestId\": \"c3e6cbee-7a30-49b0-8415-af3cc46fe257\"\n }\n}",
500
+ "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUserDevice\n<公共请求参数>\n\n{\n \"DeviceId\": \"da238a8c-****-4a5b-****-************\"\n}",
501
+ "output": "{\n \"Response\": {\n \"Data\": {\n \"AccessProtocol\": 1,\n \"ClusterId\": \"********-****-****-****-************\",\n \"ClusterName\": \"\",\n \"Code\": \"2*****vkVe\",\n \"Description\": \"\",\n \"GatewayId\": \"\",\n \"GatewayName\": \"\",\n \"DeviceId\": \"da238a8c-****-4a5b-****-************\",\n \"Ip\": \"\",\n \"Manufacturer\": \"\",\n \"Name\": \"iss-qta-dont-delete\",\n \"OrganizationId\": \"22\",\n \"Password\": \"\",\n \"Port\": 0,\n \"ProtocolType\": 0,\n \"ProtocolTypeName\": \"\",\n \"PushStreamUrl\": \"rtmp://81.**.54.**/live/2*****4vkVe\",\n \"Region\": \"\",\n \"SipDomain\": \"\",\n \"SipId\": \"\",\n \"SipIp\": \"\",\n \"SipPort\": 0,\n \"Status\": 0,\n \"TransportProtocol\": 0,\n \"Type\": 1,\n \"Username\": \"\"\n },\n \"RequestId\": \"c3e6cbee-7a30-49b0-8415-af3cc46fe257\"\n }\n}",
496
502
  "title": "rtmp"
497
503
  },
498
504
  {
@@ -503,7 +509,7 @@
503
509
  },
504
510
  {
505
511
  "document": " ",
506
- "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUserDevice\n<公共请求参数>\n\n{\n \"DeviceId\": \"66666666-53e4-4a79-a16e-8504f8366a531\"\n}",
512
+ "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUserDevice\n<公共请求参数>\n\n{\n \"DeviceId\": \"66666666-****-****-****-************\"\n}",
507
513
  "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"InvalidParameterValue.InvalidDeviceId\",\n \"Message\": \"无效的设备Id\"\n },\n \"RequestId\": \"c3c7c853-e5cf-4829-87f8-375b0623d750\"\n }\n}",
508
514
  "title": "无效的设备Id错误"
509
515
  }
@@ -1005,6 +1005,58 @@ def doUpdateDevice(args, parsed_globals):
1005
1005
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1006
1006
 
1007
1007
 
1008
+ def doOrderPerLicense(args, parsed_globals):
1009
+ g_param = parse_global_arg(parsed_globals)
1010
+
1011
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1012
+ cred = credential.CVMRoleCredential()
1013
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1014
+ cred = credential.STSAssumeRoleCredential(
1015
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1016
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1017
+ )
1018
+ 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):
1019
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1020
+ else:
1021
+ cred = credential.Credential(
1022
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1023
+ )
1024
+ http_profile = HttpProfile(
1025
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1026
+ reqMethod="POST",
1027
+ endpoint=g_param[OptionsDefine.Endpoint],
1028
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1029
+ )
1030
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1031
+ if g_param[OptionsDefine.Language]:
1032
+ profile.language = g_param[OptionsDefine.Language]
1033
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1034
+ client = mod.MnaClient(cred, g_param[OptionsDefine.Region], profile)
1035
+ client._sdkVersion += ("_CLI_" + __version__)
1036
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1037
+ model = models.OrderPerLicenseRequest()
1038
+ model.from_json_string(json.dumps(args))
1039
+ start_time = time.time()
1040
+ while True:
1041
+ rsp = client.OrderPerLicense(model)
1042
+ result = rsp.to_json_string()
1043
+ try:
1044
+ json_obj = json.loads(result)
1045
+ except TypeError as e:
1046
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1047
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1048
+ break
1049
+ cur_time = time.time()
1050
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1051
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1052
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1053
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1054
+ else:
1055
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1056
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1057
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
+
1059
+
1008
1060
  def doGetNetMonitor(args, parsed_globals):
1009
1061
  g_param = parse_global_arg(parsed_globals)
1010
1062
 
@@ -2127,6 +2179,7 @@ ACTION_MAP = {
2127
2179
  "GetFlowStatisticByRegion": doGetFlowStatisticByRegion,
2128
2180
  "DeleteDevice": doDeleteDevice,
2129
2181
  "UpdateDevice": doUpdateDevice,
2182
+ "OrderPerLicense": doOrderPerLicense,
2130
2183
  "GetNetMonitor": doGetNetMonitor,
2131
2184
  "UpdateHardware": doUpdateHardware,
2132
2185
  "GetGroupDetail": doGetGroupDetail,
@@ -231,6 +231,13 @@
231
231
  "output": "OrderFlowPackageResponse",
232
232
  "status": "online"
233
233
  },
234
+ "OrderPerLicense": {
235
+ "document": "购买一次性授权License",
236
+ "input": "OrderPerLicenseRequest",
237
+ "name": "订购一次性授权License",
238
+ "output": "OrderPerLicenseResponse",
239
+ "status": "online"
240
+ },
234
241
  "SetNotifyUrl": {
235
242
  "document": "设置用户流量告警信息接口,通过该接口设置流量包告警阈值以及告警时回调的url和key",
236
243
  "input": "SetNotifyUrlRequest",
@@ -3858,6 +3865,79 @@
3858
3865
  ],
3859
3866
  "type": "object"
3860
3867
  },
3868
+ "OrderPerLicenseRequest": {
3869
+ "document": "OrderPerLicense请求参数结构体",
3870
+ "members": [
3871
+ {
3872
+ "disabled": false,
3873
+ "document": "购买永久授权License的设备ID,如果是厂商未激活设备采用HardwareId",
3874
+ "example": "\"mna-test1\"",
3875
+ "member": "string",
3876
+ "name": "DeviceId",
3877
+ "required": true,
3878
+ "type": "string"
3879
+ },
3880
+ {
3881
+ "disabled": false,
3882
+ "document": "设备类型,0: SDK,1: CPE,作为用户创建或激活设备时传0,作为厂商创建待激活设备时传1",
3883
+ "example": "0",
3884
+ "member": "int64",
3885
+ "name": "Type",
3886
+ "required": true,
3887
+ "type": "int"
3888
+ },
3889
+ {
3890
+ "disabled": false,
3891
+ "document": "购买失败后是否回滚(删除)设备,默认true,如果设备绑定了生效中的流量包则不能回滚。",
3892
+ "example": "true",
3893
+ "member": "bool",
3894
+ "name": "RollBack",
3895
+ "required": false,
3896
+ "type": "bool"
3897
+ },
3898
+ {
3899
+ "disabled": false,
3900
+ "document": "是否自动选择代金券,默认false。\n有多张券时的选择策略:按照可支付订单全部金额的券,先到期的券,可抵扣金额最大的券,余额最小的券,现金券 这个优先级进行扣券,且最多只抵扣一张券。",
3901
+ "example": "false",
3902
+ "member": "bool",
3903
+ "name": "AutoVoucher",
3904
+ "required": false,
3905
+ "type": "bool"
3906
+ },
3907
+ {
3908
+ "disabled": false,
3909
+ "document": "指定代金券ID。自动选择代金券时此参数无效。目前只允许传入一张代金券。\n注:若指定的代金券不符合订单抵扣条件,则正常支付,不扣券",
3910
+ "example": "[\"OLSKVPGO4KUIU8HFDTEST1\"]",
3911
+ "member": "string",
3912
+ "name": "VoucherIds",
3913
+ "required": false,
3914
+ "type": "list"
3915
+ }
3916
+ ],
3917
+ "type": "object"
3918
+ },
3919
+ "OrderPerLicenseResponse": {
3920
+ "document": "OrderPerLicense返回参数结构体",
3921
+ "members": [
3922
+ {
3923
+ "disabled": false,
3924
+ "document": "一次性授权License的资源ID",
3925
+ "example": "56d11777-50f7-4c60-9c89-e7076c8529a9-0",
3926
+ "member": "string",
3927
+ "name": "ResourceId",
3928
+ "output_required": true,
3929
+ "type": "string",
3930
+ "value_allowed_null": false
3931
+ },
3932
+ {
3933
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
3934
+ "member": "string",
3935
+ "name": "RequestId",
3936
+ "type": "string"
3937
+ }
3938
+ ],
3939
+ "type": "object"
3940
+ },
3861
3941
  "SetNotifyUrlRequest": {
3862
3942
  "document": "SetNotifyUrl请求参数结构体",
3863
3943
  "members": [
@@ -282,6 +282,14 @@
282
282
  "title": "示例1"
283
283
  }
284
284
  ],
285
+ "OrderPerLicense": [
286
+ {
287
+ "document": "",
288
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: OrderPerLicense\n<公共请求参数>\n\n{\n \"DeviceId\": \"abc\",\n \"Type\": 0,\n \"AutoVoucher\": true,\n \"VoucherIds\": [\n \"abc\"\n ]\n}",
289
+ "output": "{\n \"Response\": {\n \"RequestId\": \"1206563f-f13f-4647-aaa8-37fa86954cc4-1\",\n \"ResourceId\": \"56d11777-50f7-4c60-9c89-e7076c8529a9-0\"\n }\n}",
290
+ "title": "示例1"
291
+ }
292
+ ],
285
293
  "SetNotifyUrl": [
286
294
  {
287
295
  "document": "",