tccli 3.0.1039.1__py2.py3-none-any.whl → 3.0.1040.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/examples/billing/v20180709/DescribeDosageDetailList.md +63 -0
  3. tccli/examples/cfw/v20190904/DescribeIdsWhiteRule.md +10 -0
  4. tccli/examples/tdmq/v20200217/ModifyEnvironmentRole.md +4 -4
  5. tccli/examples/tione/v20211111/DescribeLatestTrainingMetrics.md +8 -2
  6. tccli/examples/tione/v20211111/DescribeNotebooks.md +15 -2
  7. tccli/examples/vod/v20180717/ComposeMedia.md +6 -6
  8. tccli/examples/vod/v20180717/CreateCLSLogset.md +21 -0
  9. tccli/examples/vod/v20180717/CreateCLSTopic.md +23 -0
  10. tccli/examples/vod/v20180717/DeleteCLSTopic.md +20 -0
  11. tccli/examples/vod/v20180717/DescribeCLSLogsets.md +26 -0
  12. tccli/examples/vod/v20180717/DescribeCLSPushTargets.md +38 -0
  13. tccli/examples/vod/v20180717/DescribeCLSTopics.md +31 -0
  14. tccli/examples/vod/v20180717/SetCLSPushTarget.md +25 -0
  15. tccli/services/billing/billing_client.py +61 -8
  16. tccli/services/billing/v20180709/api.json +323 -0
  17. tccli/services/billing/v20180709/examples.json +8 -0
  18. tccli/services/cfs/v20190719/api.json +9 -0
  19. tccli/services/cfw/v20190904/api.json +76 -0
  20. tccli/services/cfw/v20190904/examples.json +1 -1
  21. tccli/services/clb/v20180317/api.json +1 -1
  22. tccli/services/ess/v20201111/api.json +1 -1
  23. tccli/services/essbasic/v20210526/api.json +27 -27
  24. tccli/services/mps/v20190612/api.json +40 -2
  25. tccli/services/tdmq/v20200217/examples.json +2 -2
  26. tccli/services/teo/v20220901/api.json +1 -0
  27. tccli/services/tione/v20211111/api.json +205 -75
  28. tccli/services/tione/v20211111/examples.json +2 -2
  29. tccli/services/trtc/v20190722/api.json +12 -3
  30. tccli/services/vod/v20180717/api.json +555 -0
  31. tccli/services/vod/v20180717/examples.json +57 -1
  32. tccli/services/vod/vod_client.py +375 -4
  33. {tccli-3.0.1039.1.dist-info → tccli-3.0.1040.1.dist-info}/METADATA +2 -2
  34. {tccli-3.0.1039.1.dist-info → tccli-3.0.1040.1.dist-info}/RECORD +37 -29
  35. {tccli-3.0.1039.1.dist-info → tccli-3.0.1040.1.dist-info}/WHEEL +0 -0
  36. {tccli-3.0.1039.1.dist-info → tccli-3.0.1040.1.dist-info}/entry_points.txt +0 -0
  37. {tccli-3.0.1039.1.dist-info → tccli-3.0.1040.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1039.1'
1
+ __version__ = '3.0.1040.1'
@@ -0,0 +1,63 @@
1
+ **Example 1: 获取用量明细数据**
2
+
3
+ 获取用量明细数据
4
+
5
+ Input:
6
+
7
+ ```
8
+ tccli billing DescribeDosageDetailList --cli-unfold-argument \
9
+ --Offset 43150 \
10
+ --Limit 3 \
11
+ --StartTime 2023-09-01 \
12
+ --EndTime 2023-09-30 \
13
+ --ProductCode p_dsa
14
+ ```
15
+
16
+ Output:
17
+ ```
18
+ {
19
+ "Response": {
20
+ "Record": [
21
+ {
22
+ "AttrStr": [
23
+ {
24
+ "Key": "zoneId",
25
+ "Value": "470004"
26
+ },
27
+ {
28
+ "Key": "dayPeek",
29
+ "Value": "4872430721"
30
+ },
31
+ {
32
+ "Key": "regionId",
33
+ "Value": "47"
34
+ }
35
+ ],
36
+ "BillingItemCode": "v_dsa_gipa_bandwidth_game",
37
+ "BillingItemCodeName": "全球IP应用加速-游戏加速带宽",
38
+ "Date": "2023-09-01",
39
+ "DeductValue": 0,
40
+ "DosageBeginTime": "2023-09-01 00:02:00",
41
+ "DosageEndTime": "2023-09-01 00:02:59",
42
+ "DosageType": "minute",
43
+ "DosageUnit": "Mbps",
44
+ "DosageValue": 2206972795,
45
+ "ProductCode": "p_dsa",
46
+ "ProductCodeName": "全站加速网络ECDN",
47
+ "RemainValue": 2206972795,
48
+ "SdkAppId": "",
49
+ "SheetName": [
50
+ "全球IP应用加速_1分钟"
51
+ ],
52
+ "SubBillingItemCode": "sv_dsa_gipa_bandwidth_game_yd_month",
53
+ "SubBillingItemCodeName": "GIPA-游戏加速带宽-移动网络-按月结算",
54
+ "SubProductCode": "sp_dsa_gipa",
55
+ "SubProductCodeName": "全球IP应用加速",
56
+ "Uin": "909619400"
57
+ }
58
+ ],
59
+ "RequestId": "184cd45e-d2e1-4043-a47b-183617836e25"
60
+ }
61
+ }
62
+ ```
63
+
@@ -14,6 +14,16 @@ Output:
14
14
  ```
15
15
  {
16
16
  "Response": {
17
+ "Data": [
18
+ {
19
+ "DstIp": "10.23.33.2",
20
+ "FwType": 4,
21
+ "Id": 63,
22
+ "RuleId": "20006",
23
+ "SrcIp": "10.23.33.1",
24
+ "WhiteRuleType": "srcdst"
25
+ }
26
+ ],
17
27
  "RequestId": "88db276f-42d5-4b60-afc1-2c5799250a99",
18
28
  "ReturnCode": 0,
19
29
  "ReturnMsg": "success",
@@ -6,17 +6,17 @@ Input:
6
6
 
7
7
  ```
8
8
  tccli tdmq ModifyEnvironmentRole --cli-unfold-argument \
9
- --EnvironmentId abc \
10
- --RoleName abc \
9
+ --EnvironmentId default \
10
+ --RoleName test_role \
11
11
  --Permissions abc \
12
- --ClusterId abc
12
+ --ClusterId pulsar-xxxx
13
13
  ```
14
14
 
15
15
  Output:
16
16
  ```
17
17
  {
18
18
  "Response": {
19
- "RequestId": "gggxxxx"
19
+ "RequestId": "20846f8d-6438-4cd9-a2a4-09d5f4e8f0db"
20
20
  }
21
21
  }
22
22
  ```
@@ -19,8 +19,14 @@ Output:
19
19
  {
20
20
  "MetricName": "loss",
21
21
  "Values": [
22
- {},
23
- {}
22
+ {
23
+ "Timestamp": 1641002400,
24
+ "Value": 182.06
25
+ },
26
+ {
27
+ "Timestamp": 1641002410,
28
+ "Value": 176.06
29
+ }
24
30
  ]
25
31
  }
26
32
  ]
@@ -61,12 +61,25 @@ Output:
61
61
  "VolumeSourceType": "abc",
62
62
  "VolumeSourceCFS": {
63
63
  "Id": "abc",
64
- "Path": "abc"
64
+ "Path": "abc",
65
+ "MountType": "abc",
66
+ "Protocol": "abc"
65
67
  },
66
68
  "Message": "abc",
67
69
  "UserTypes": [
68
70
  "abc"
69
- ]
71
+ ],
72
+ "SSHConfig": {
73
+ "Enable": true,
74
+ "PublicKey": "abc",
75
+ "Port": 0,
76
+ "LoginCommand": "abc"
77
+ },
78
+ "VolumeSourceGooseFS": {
79
+ "Id": "abc",
80
+ "Type": "abc",
81
+ "Path": "abc"
82
+ }
70
83
  }
71
84
  ],
72
85
  "TotalCount": 1,
@@ -90,14 +90,14 @@ tccli vod ComposeMedia --cli-unfold-argument \
90
90
  --Output.Container mp4 \
91
91
  --Output.FileName test \
92
92
  --Tracks.0.TrackItems.0.Type Video \
93
- --Tracks.0.TrackItems.0.VideoItem.CoordinateOrigin Center \
94
- --Tracks.0.TrackItems.0.VideoItem.Width 30% \
95
- --Tracks.0.TrackItems.0.VideoItem.SourceMedia 5285485487985271488 \
96
- --Tracks.0.TrackItems.0.VideoItem.XPos 25% \
97
- --Tracks.0.TrackItems.0.VideoItem.YPos 25% \
93
+ --Tracks.0.TrackItems.0.VideoItem.SourceMedia 5285485487985271487 \
98
94
  --Tracks.0.Type Video \
99
95
  --Tracks.1.TrackItems.0.Type Video \
100
- --Tracks.1.TrackItems.0.VideoItem.SourceMedia 5285485487985271487 \
96
+ --Tracks.1.TrackItems.0.VideoItem.CoordinateOrigin Center \
97
+ --Tracks.1.TrackItems.0.VideoItem.Width 30% \
98
+ --Tracks.1.TrackItems.0.VideoItem.SourceMedia 5285485487985271488 \
99
+ --Tracks.1.TrackItems.0.VideoItem.XPos 25% \
100
+ --Tracks.1.TrackItems.0.VideoItem.YPos 25% \
101
101
  --Tracks.1.Type Video
102
102
  ```
103
103
 
@@ -0,0 +1,21 @@
1
+ **Example 1: 创建一个新的日志集**
2
+
3
+
4
+
5
+ Input:
6
+
7
+ ```
8
+ tccli vod CreateCLSLogset --cli-unfold-argument \
9
+ --CLSRegion ap-guangzhou
10
+ ```
11
+
12
+ Output:
13
+ ```
14
+ {
15
+ "Response": {
16
+ "LogsetId": "54079098-61ea-48f9-8270-3b041a5d0150",
17
+ "RequestId": "xxx"
18
+ }
19
+ }
20
+ ```
21
+
@@ -0,0 +1,23 @@
1
+ **Example 1: 创建一个新的日志主题**
2
+
3
+
4
+
5
+ Input:
6
+
7
+ ```
8
+ tccli vod CreateCLSTopic --cli-unfold-argument \
9
+ --CLSRegion ap-guangzhou \
10
+ --TopicName mytopic \
11
+ --LogsetId 54079098-61ea-48f9-8270-3b041a5d0150
12
+ ```
13
+
14
+ Output:
15
+ ```
16
+ {
17
+ "Response": {
18
+ "TopicId": "780ba384-5bc1-4cb1-a0e9-0cf8fafd3ee0",
19
+ "RequestId": "xxx"
20
+ }
21
+ }
22
+ ```
23
+
@@ -0,0 +1,20 @@
1
+ **Example 1: 删除CLS日志主题**
2
+
3
+
4
+
5
+ Input:
6
+
7
+ ```
8
+ tccli vod DeleteCLSTopic --cli-unfold-argument \
9
+ --TopicId 780ba384-5bc1-4cb1-a0e9-0cf8fafd3ee0
10
+ ```
11
+
12
+ Output:
13
+ ```
14
+ {
15
+ "Response": {
16
+ "RequestId": "xxx"
17
+ }
18
+ }
19
+ ```
20
+
@@ -0,0 +1,26 @@
1
+ **Example 1: 查询点播创建的广州地区日志集**
2
+
3
+
4
+
5
+ Input:
6
+
7
+ ```
8
+ tccli vod DescribeCLSLogsets --cli-unfold-argument \
9
+ --CLSRegion ap-guangzhou
10
+ ```
11
+
12
+ Output:
13
+ ```
14
+ {
15
+ "Response": {
16
+ "Logsets": [
17
+ {
18
+ "LogsetId": "54079098-61ea-48f9-8270-3b041a5d0150",
19
+ "LogsetName": "vod_cdn_logset_cn"
20
+ }
21
+ ],
22
+ "RequestId": "xxx"
23
+ }
24
+ }
25
+ ```
26
+
@@ -0,0 +1,38 @@
1
+ **Example 1: 查询日志投递目标**
2
+
3
+
4
+
5
+ Input:
6
+
7
+ ```
8
+ tccli vod DescribeCLSPushTargets --cli-unfold-argument \
9
+ --Domains xxx.vod-qcloud.com
10
+ ```
11
+
12
+ Output:
13
+ ```
14
+ {
15
+ "Response": {
16
+ "TotalCount": 1,
17
+ "DomainCLSTargets": [
18
+ {
19
+ "Domain": "xxx.vod-qcloud.com",
20
+ "ChineseMainlandCLSTargetInfo": {
21
+ "Switch": "OFF",
22
+ "CLSRegion": "ap-guangzhou",
23
+ "TopicId": "",
24
+ "LogsetId": ""
25
+ },
26
+ "OutsideChineseMainlandCLSTargetInfo": {
27
+ "Switch": "OFF",
28
+ "CLSRegion": "ap-singapore",
29
+ "TopicId": "",
30
+ "LogsetId": ""
31
+ }
32
+ }
33
+ ],
34
+ "RequestId": "xxx"
35
+ }
36
+ }
37
+ ```
38
+
@@ -0,0 +1,31 @@
1
+ **Example 1: 查询指定日志主题**
2
+
3
+
4
+
5
+ Input:
6
+
7
+ ```
8
+ tccli vod DescribeCLSTopics --cli-unfold-argument \
9
+ --CLSRegion ap-guangzhou \
10
+ --LogsetId 54079098-61ea-48f9-8270-3b041a5d0150 \
11
+ --Offset 0 \
12
+ --Limit 0
13
+ ```
14
+
15
+ Output:
16
+ ```
17
+ {
18
+ "Response": {
19
+ "TotalCount": 1,
20
+ "Topics": [
21
+ {
22
+ "TopicId": "780ba384-5bc1-4cb1-a0e9-0cf8fafd3ee0",
23
+ "TopicName": "mytopic",
24
+ "LogsetId": "54079098-61ea-48f9-8270-3b041a5d0150"
25
+ }
26
+ ],
27
+ "RequestId": "xxx"
28
+ }
29
+ }
30
+ ```
31
+
@@ -0,0 +1,25 @@
1
+ **Example 1: 设置中国大陆地区的日志投递目标**
2
+
3
+
4
+
5
+ Input:
6
+
7
+ ```
8
+ tccli vod SetCLSPushTarget --cli-unfold-argument \
9
+ --SubAppId 0 \
10
+ --Domain abc.com \
11
+ --ChineseMainlandCLSTargetInfo.Switch ON \
12
+ --ChineseMainlandCLSTargetInfo.CLSRegion ap-guangzhou \
13
+ --ChineseMainlandCLSTargetInfo.TopicId abc \
14
+ --ChineseMainlandCLSTargetInfo.LogsetId abc
15
+ ```
16
+
17
+ Output:
18
+ ```
19
+ {
20
+ "Response": {
21
+ "RequestId": "abc"
22
+ }
23
+ }
24
+ ```
25
+
@@ -277,6 +277,58 @@ def doDescribeSavingPlanOverview(args, parsed_globals):
277
277
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
278
 
279
279
 
280
+ def doDescribeDosageDetailList(args, parsed_globals):
281
+ g_param = parse_global_arg(parsed_globals)
282
+
283
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
284
+ cred = credential.CVMRoleCredential()
285
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
286
+ cred = credential.STSAssumeRoleCredential(
287
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
288
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
289
+ )
290
+ 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):
291
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
292
+ else:
293
+ cred = credential.Credential(
294
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
295
+ )
296
+ http_profile = HttpProfile(
297
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
298
+ reqMethod="POST",
299
+ endpoint=g_param[OptionsDefine.Endpoint],
300
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
301
+ )
302
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
303
+ if g_param[OptionsDefine.Language]:
304
+ profile.language = g_param[OptionsDefine.Language]
305
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
306
+ client = mod.BillingClient(cred, g_param[OptionsDefine.Region], profile)
307
+ client._sdkVersion += ("_CLI_" + __version__)
308
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
+ model = models.DescribeDosageDetailListRequest()
310
+ model.from_json_string(json.dumps(args))
311
+ start_time = time.time()
312
+ while True:
313
+ rsp = client.DescribeDosageDetailList(model)
314
+ result = rsp.to_json_string()
315
+ try:
316
+ json_obj = json.loads(result)
317
+ except TypeError as e:
318
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
319
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
320
+ break
321
+ cur_time = time.time()
322
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
323
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
324
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
325
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
326
+ else:
327
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
328
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
329
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
+
331
+
280
332
  def doCreateAllocationTag(args, parsed_globals):
281
333
  g_param = parse_global_arg(parsed_globals)
282
334
 
@@ -745,7 +797,7 @@ def doDescribeBillList(args, parsed_globals):
745
797
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
798
 
747
799
 
748
- def doCreateSavingPlanOrder(args, parsed_globals):
800
+ def doDescribeBillDownloadUrl(args, parsed_globals):
749
801
  g_param = parse_global_arg(parsed_globals)
750
802
 
751
803
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -774,11 +826,11 @@ def doCreateSavingPlanOrder(args, parsed_globals):
774
826
  client = mod.BillingClient(cred, g_param[OptionsDefine.Region], profile)
775
827
  client._sdkVersion += ("_CLI_" + __version__)
776
828
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
- model = models.CreateSavingPlanOrderRequest()
829
+ model = models.DescribeBillDownloadUrlRequest()
778
830
  model.from_json_string(json.dumps(args))
779
831
  start_time = time.time()
780
832
  while True:
781
- rsp = client.CreateSavingPlanOrder(model)
833
+ rsp = client.DescribeBillDownloadUrl(model)
782
834
  result = rsp.to_json_string()
783
835
  try:
784
836
  json_obj = json.loads(result)
@@ -1369,7 +1421,7 @@ def doDescribeTagList(args, parsed_globals):
1369
1421
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1370
1422
 
1371
1423
 
1372
- def doDescribeBillDownloadUrl(args, parsed_globals):
1424
+ def doCreateSavingPlanOrder(args, parsed_globals):
1373
1425
  g_param = parse_global_arg(parsed_globals)
1374
1426
 
1375
1427
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1398,11 +1450,11 @@ def doDescribeBillDownloadUrl(args, parsed_globals):
1398
1450
  client = mod.BillingClient(cred, g_param[OptionsDefine.Region], profile)
1399
1451
  client._sdkVersion += ("_CLI_" + __version__)
1400
1452
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1401
- model = models.DescribeBillDownloadUrlRequest()
1453
+ model = models.CreateSavingPlanOrderRequest()
1402
1454
  model.from_json_string(json.dumps(args))
1403
1455
  start_time = time.time()
1404
1456
  while True:
1405
- rsp = client.DescribeBillDownloadUrl(model)
1457
+ rsp = client.CreateSavingPlanOrder(model)
1406
1458
  result = rsp.to_json_string()
1407
1459
  try:
1408
1460
  json_obj = json.loads(result)
@@ -1697,6 +1749,7 @@ ACTION_MAP = {
1697
1749
  "DescribeDealsByCond": doDescribeDealsByCond,
1698
1750
  "DescribeBillResourceSummary": doDescribeBillResourceSummary,
1699
1751
  "DescribeSavingPlanOverview": doDescribeSavingPlanOverview,
1752
+ "DescribeDosageDetailList": doDescribeDosageDetailList,
1700
1753
  "CreateAllocationTag": doCreateAllocationTag,
1701
1754
  "PayDeals": doPayDeals,
1702
1755
  "DescribeCostSummaryByProject": doDescribeCostSummaryByProject,
@@ -1706,7 +1759,7 @@ ACTION_MAP = {
1706
1759
  "DescribeBillSummary": doDescribeBillSummary,
1707
1760
  "DescribeBillSummaryByPayMode": doDescribeBillSummaryByPayMode,
1708
1761
  "DescribeBillList": doDescribeBillList,
1709
- "CreateSavingPlanOrder": doCreateSavingPlanOrder,
1762
+ "DescribeBillDownloadUrl": doDescribeBillDownloadUrl,
1710
1763
  "DescribeDosageCosDetailByDate": doDescribeDosageCosDetailByDate,
1711
1764
  "DescribeBillDetailForOrganization": doDescribeBillDetailForOrganization,
1712
1765
  "DescribeAccountBalance": doDescribeAccountBalance,
@@ -1718,7 +1771,7 @@ ACTION_MAP = {
1718
1771
  "DescribeBillSummaryByTag": doDescribeBillSummaryByTag,
1719
1772
  "DescribeBillSummaryForOrganization": doDescribeBillSummaryForOrganization,
1720
1773
  "DescribeTagList": doDescribeTagList,
1721
- "DescribeBillDownloadUrl": doDescribeBillDownloadUrl,
1774
+ "CreateSavingPlanOrder": doCreateSavingPlanOrder,
1722
1775
  "DeleteAllocationTag": doDeleteAllocationTag,
1723
1776
  "DescribeSavingPlanCoverage": doDescribeSavingPlanCoverage,
1724
1777
  "DescribeCostSummaryByProduct": doDescribeCostSummaryByProduct,