tccli 3.0.1015.1__py2.py3-none-any.whl → 3.0.1016.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1015.1'
1
+ __version__ = '3.0.1016.1'
@@ -0,0 +1,49 @@
1
+ **Example 1: 查询文件夹**
2
+
3
+ 查询文件夹
4
+
5
+ Input:
6
+
7
+ ```
8
+ tccli oceanus DescribeFolder --cli-unfold-argument \
9
+ --FolderId folder-bnjsm2sb \
10
+ --WorkSpaceId space-7rfcnslf \
11
+ --FolderType 1
12
+ ```
13
+
14
+ Output:
15
+ ```
16
+ {
17
+ "Response": {
18
+ "FolderId": "folder-bnjsm2sb",
19
+ "FolderName": "6.9_connector",
20
+ "FolderType": 1,
21
+ "ParentId": "root",
22
+ "RequestId": "3ca249e8-b742-4e97-856d-1fca5a95d6a5",
23
+ "SubFolderInfo": [
24
+ {
25
+ "FolderId": "folder-gbtcphg0",
26
+ "FolderName": "hive_catalog_config_311"
27
+ },
28
+ {
29
+ "FolderId": "folder-79b2dxuc",
30
+ "FolderName": "sql_server"
31
+ },
32
+ {
33
+ "FolderId": "folder-oc406jen",
34
+ "FolderName": "doris"
35
+ },
36
+ {
37
+ "FolderId": "folder-3ldo2w3g",
38
+ "FolderName": "mysql_cdc"
39
+ },
40
+ {
41
+ "FolderId": "folder-nodi86tq",
42
+ "FolderName": "kudu"
43
+ }
44
+ ],
45
+ "WorkSpaceId": "space-7rfcnslf"
46
+ }
47
+ }
48
+ ```
49
+
@@ -433,6 +433,58 @@ def doCreateJob(args, parsed_globals):
433
433
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
434
 
435
435
 
436
+ def doDescribeFolder(args, parsed_globals):
437
+ g_param = parse_global_arg(parsed_globals)
438
+
439
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
440
+ cred = credential.CVMRoleCredential()
441
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
442
+ cred = credential.STSAssumeRoleCredential(
443
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
444
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
445
+ )
446
+ 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):
447
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
448
+ else:
449
+ cred = credential.Credential(
450
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
451
+ )
452
+ http_profile = HttpProfile(
453
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
454
+ reqMethod="POST",
455
+ endpoint=g_param[OptionsDefine.Endpoint],
456
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
457
+ )
458
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
459
+ if g_param[OptionsDefine.Language]:
460
+ profile.language = g_param[OptionsDefine.Language]
461
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
462
+ client = mod.OceanusClient(cred, g_param[OptionsDefine.Region], profile)
463
+ client._sdkVersion += ("_CLI_" + __version__)
464
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
+ model = models.DescribeFolderRequest()
466
+ model.from_json_string(json.dumps(args))
467
+ start_time = time.time()
468
+ while True:
469
+ rsp = client.DescribeFolder(model)
470
+ result = rsp.to_json_string()
471
+ try:
472
+ json_obj = json.loads(result)
473
+ except TypeError as e:
474
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
475
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
476
+ break
477
+ cur_time = time.time()
478
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
479
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
480
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
481
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
482
+ else:
483
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
484
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
485
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
+
487
+
436
488
  def doDescribeResourceConfigs(args, parsed_globals):
437
489
  g_param = parse_global_arg(parsed_globals)
438
490
 
@@ -1856,6 +1908,7 @@ ACTION_MAP = {
1856
1908
  "CreateWorkSpace": doCreateWorkSpace,
1857
1909
  "CreateResourceConfig": doCreateResourceConfig,
1858
1910
  "CreateJob": doCreateJob,
1911
+ "DescribeFolder": doDescribeFolder,
1859
1912
  "DescribeResourceConfigs": doDescribeResourceConfigs,
1860
1913
  "ModifyFolder": doModifyFolder,
1861
1914
  "DescribeJobSavepoint": doDescribeJobSavepoint,
@@ -112,6 +112,13 @@
112
112
  "output": "DescribeClustersResponse",
113
113
  "status": "online"
114
114
  },
115
+ "DescribeFolder": {
116
+ "document": "查询指定文件夹及其相应的子文件夹信息",
117
+ "input": "DescribeFolderRequest",
118
+ "name": "查询文件夹",
119
+ "output": "DescribeFolderResponse",
120
+ "status": "online"
121
+ },
115
122
  "DescribeJobConfigs": {
116
123
  "document": "查询作业配置列表,一次最多查询100个",
117
124
  "input": "DescribeJobConfigsRequest",
@@ -2502,6 +2509,111 @@
2502
2509
  ],
2503
2510
  "type": "object"
2504
2511
  },
2512
+ "DescribeFolderRequest": {
2513
+ "document": "DescribeFolder请求参数结构体",
2514
+ "members": [
2515
+ {
2516
+ "disabled": false,
2517
+ "document": "folder id",
2518
+ "example": "folder-lfqkt10s",
2519
+ "member": "string",
2520
+ "name": "FolderId",
2521
+ "required": true,
2522
+ "type": "string"
2523
+ },
2524
+ {
2525
+ "disabled": false,
2526
+ "document": "workspace id",
2527
+ "example": "space-53rqk422",
2528
+ "member": "string",
2529
+ "name": "WorkSpaceId",
2530
+ "required": true,
2531
+ "type": "string"
2532
+ },
2533
+ {
2534
+ "disabled": false,
2535
+ "document": "1:资源文件夹\n其他:作业文件夹",
2536
+ "example": "1",
2537
+ "member": "int64",
2538
+ "name": "FolderType",
2539
+ "required": true,
2540
+ "type": "int"
2541
+ }
2542
+ ],
2543
+ "type": "object"
2544
+ },
2545
+ "DescribeFolderResponse": {
2546
+ "document": "DescribeFolder返回参数结构体",
2547
+ "members": [
2548
+ {
2549
+ "disabled": false,
2550
+ "document": "folder id",
2551
+ "example": "folder-lfqkt10s",
2552
+ "member": "string",
2553
+ "name": "FolderId",
2554
+ "output_required": true,
2555
+ "type": "string",
2556
+ "value_allowed_null": false
2557
+ },
2558
+ {
2559
+ "disabled": false,
2560
+ "document": "folder name",
2561
+ "example": "test",
2562
+ "member": "string",
2563
+ "name": "FolderName",
2564
+ "output_required": true,
2565
+ "type": "string",
2566
+ "value_allowed_null": false
2567
+ },
2568
+ {
2569
+ "disabled": false,
2570
+ "document": "父文件夹id",
2571
+ "example": "folder-lfqkt10i",
2572
+ "member": "string",
2573
+ "name": "ParentId",
2574
+ "output_required": true,
2575
+ "type": "string",
2576
+ "value_allowed_null": false
2577
+ },
2578
+ {
2579
+ "disabled": false,
2580
+ "document": "文件夹类型",
2581
+ "example": "1",
2582
+ "member": "int64",
2583
+ "name": "FolderType",
2584
+ "output_required": true,
2585
+ "type": "int",
2586
+ "value_allowed_null": false
2587
+ },
2588
+ {
2589
+ "disabled": false,
2590
+ "document": "workspace id",
2591
+ "example": "无",
2592
+ "member": "string",
2593
+ "name": "WorkSpaceId",
2594
+ "output_required": true,
2595
+ "type": "string",
2596
+ "value_allowed_null": false
2597
+ },
2598
+ {
2599
+ "disabled": false,
2600
+ "document": "子文件夹信息\n注意:此字段可能返回 null,表示取不到有效值。",
2601
+ "example": "无",
2602
+ "member": "SubFolderInfo",
2603
+ "name": "SubFolderInfo",
2604
+ "output_required": true,
2605
+ "type": "list",
2606
+ "value_allowed_null": true
2607
+ },
2608
+ {
2609
+ "document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
2610
+ "member": "string",
2611
+ "name": "RequestId",
2612
+ "type": "string"
2613
+ }
2614
+ ],
2615
+ "type": "object"
2616
+ },
2505
2617
  "DescribeJobConfigsRequest": {
2506
2618
  "document": "DescribeJobConfigs请求参数结构体",
2507
2619
  "members": [
@@ -6450,6 +6562,32 @@
6450
6562
  ],
6451
6563
  "type": "object"
6452
6564
  },
6565
+ "SubFolderInfo": {
6566
+ "document": "子目录信息",
6567
+ "members": [
6568
+ {
6569
+ "disabled": false,
6570
+ "document": "folder id",
6571
+ "example": "folder-lfqkt10s",
6572
+ "member": "string",
6573
+ "name": "FolderId",
6574
+ "output_required": true,
6575
+ "type": "string",
6576
+ "value_allowed_null": false
6577
+ },
6578
+ {
6579
+ "disabled": false,
6580
+ "document": "folder name",
6581
+ "example": "test",
6582
+ "member": "string",
6583
+ "name": "FolderName",
6584
+ "output_required": true,
6585
+ "type": "string",
6586
+ "value_allowed_null": false
6587
+ }
6588
+ ],
6589
+ "usage": "out"
6590
+ },
6453
6591
  "SystemResourceItem": {
6454
6592
  "document": "系统资源返回值",
6455
6593
  "members": [
@@ -146,6 +146,14 @@
146
146
  "title": "查询集群"
147
147
  }
148
148
  ],
149
+ "DescribeFolder": [
150
+ {
151
+ "document": "查询文件夹",
152
+ "input": "POST / HTTP/1.1\nHost: oceanus.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeFolder\n<公共请求参数>\n\n{\n \"FolderId\": \"folder-bnjsm2sb\",\n \"WorkSpaceId\": \"space-7rfcnslf\",\n \"FolderType\": 1\n}",
153
+ "output": "{\n \"Response\": {\n \"FolderId\": \"folder-bnjsm2sb\",\n \"FolderName\": \"6.9_connector\",\n \"FolderType\": 1,\n \"ParentId\": \"root\",\n \"RequestId\": \"3ca249e8-b742-4e97-856d-1fca5a95d6a5\",\n \"SubFolderInfo\": [\n {\n \"FolderId\": \"folder-gbtcphg0\",\n \"FolderName\": \"hive_catalog_config_311\"\n },\n {\n \"FolderId\": \"folder-79b2dxuc\",\n \"FolderName\": \"sql_server\"\n },\n {\n \"FolderId\": \"folder-oc406jen\",\n \"FolderName\": \"doris\"\n },\n {\n \"FolderId\": \"folder-3ldo2w3g\",\n \"FolderName\": \"mysql_cdc\"\n },\n {\n \"FolderId\": \"folder-nodi86tq\",\n \"FolderName\": \"kudu\"\n }\n ],\n \"WorkSpaceId\": \"space-7rfcnslf\"\n }\n}",
154
+ "title": "查询文件夹"
155
+ }
156
+ ],
149
157
  "DescribeJobConfigs": [
150
158
  {
151
159
  "document": "查询指定的作业配置",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tccli
3
- Version: 3.0.1015.1
3
+ Version: 3.0.1016.1
4
4
  Summary: Universal Command Line Environment for Tencent Cloud
5
5
  Project-URL: Bug Tracker, https://github.com/TencentCloud/tencentcloud-cli/issues
6
6
  Project-URL: Homepage, https://github.com/TencentCloud/tencentcloud-cli
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 2.7
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Requires-Dist: jmespath==0.10.0
15
15
  Requires-Dist: six==1.16.0
16
- Requires-Dist: tencentcloud-sdk-python>=3.0.1015
16
+ Requires-Dist: tencentcloud-sdk-python>=3.0.1016
17
17
  Description-Content-Type: text/markdown
18
18
 
19
19
  # 命令行工具简介
@@ -1,4 +1,4 @@
1
- tccli/__init__.py,sha256=gndS9WJvBFlQFGDWbZM9V6TLGl2KVpiBm4l-M43ZzjU,27
1
+ tccli/__init__.py,sha256=61bNU-8THxbtSSFESKi3wEmyZZQUIBdoBCtzT8jz44g,27
2
2
  tccli/argparser.py,sha256=iFaw_iIMdyVwUdcv2_2OHQfe7-7j9yGzoOgXgXswoBo,5555
3
3
  tccli/argument.py,sha256=ZtVo3AySpzM-Hw6_hPdU27FjUsc8QPB2fIuLy7JSBAk,8091
4
4
  tccli/base_command.py,sha256=rFWNAwfS0GA6LLGNOM-iPI0RV81Jag5cZn536ZQN0pw,2859
@@ -6798,6 +6798,7 @@ tccli/examples/oceanus/v20190422/DeleteResources.md,sha256=kI7G8G35KgpKkLsVuSlzm
6798
6798
  tccli/examples/oceanus/v20190422/DeleteTableConfig.md,sha256=RC1KGZMGyoKtEynnSlbCP_P6UBtENCA15X_up4lqKJw,294
6799
6799
  tccli/examples/oceanus/v20190422/DeleteWorkSpace.md,sha256=eNdP1MYFY-CpYON_r6ekhdcZb2SKIsnJ7Oh4gP5hjwk,229
6800
6800
  tccli/examples/oceanus/v20190422/DescribeClusters.md,sha256=iz7ajadyjSg8q_TE7gKhsroPTzCbyplZ_YVn21vgDOI,4684
6801
+ tccli/examples/oceanus/v20190422/DescribeFolder.md,sha256=J_00VE_odnQ7eVcu1eWjwaI5XR6c-y8awPjn2QufyeI,1119
6801
6802
  tccli/examples/oceanus/v20190422/DescribeJobConfigs.md,sha256=p7PawufuZXXTHetys0EVXa42-arxjiQ-2VlDCnbS1tw,2465
6802
6803
  tccli/examples/oceanus/v20190422/DescribeJobSavepoint.md,sha256=_dO0sKVtxmbkeUxDQ_B5cC6dM_SJAcrkK9wYJi4kE0k,1318
6803
6804
  tccli/examples/oceanus/v20190422/DescribeJobSubmissionLog.md,sha256=xdRg5vSoEG23TuPGhQ9ZiYpYOoqYMCGZu5DJ_1s8BGg,3477
@@ -11893,9 +11894,9 @@ tccli/services/npp/npp_client.py,sha256=t2aT-HKgt1N92lDv1oCz9olouswahUOkaFC-df20
11893
11894
  tccli/services/npp/v20190823/api.json,sha256=PDUAkhWDtol-4RI5QbMIqzY3Zxt69VxCGnPAhfplId0,39200
11894
11895
  tccli/services/npp/v20190823/examples.json,sha256=azmnTGdIEPJnXLrmF44witGE720MeKXlXeWNghXPP4s,5164
11895
11896
  tccli/services/oceanus/__init__.py,sha256=u6C9EuoVN4BwKu4JcesnJbyrIeTq4ijrJ-tUdublrRc,93
11896
- tccli/services/oceanus/oceanus_client.py,sha256=dS9k9sk095cr0OrfYM6k34dsjUsWuMNjAbA1NCaLAJE,112055
11897
- tccli/services/oceanus/v20190422/api.json,sha256=RPM8M_wi-RwV7fw9VqgYGjJUcIbIForECzBuq_7L5xk,219176
11898
- tccli/services/oceanus/v20190422/examples.json,sha256=ycO1TmnYQJWt0XiIplpOnlLG_QGJ5j3Dc5kKgGIsA_o,46186
11897
+ tccli/services/oceanus/oceanus_client.py,sha256=vfALlm6XbcZDysbR-7RJMrAhW9CMeYyVp8MzFIMvH0w,115087
11898
+ tccli/services/oceanus/v20190422/api.json,sha256=5oUIzJnKEercQsKffQSrZRovy5PBXoh18bL_5xyiD0g,223141
11899
+ tccli/services/oceanus/v20190422/examples.json,sha256=90Xe7rAkPDXHeDbYFr0ueNKcUdd7Z_8UmhperdVIGik,47585
11899
11900
  tccli/services/ocr/__init__.py,sha256=1UdHN9VtB5qVwAn2FMefSi4BhMTJOjmFgYZT-zTEVBM,85
11900
11901
  tccli/services/ocr/ocr_client.py,sha256=w8fVHmxlg0mkc6cQNDJaPC7f828QG3aXbAbYJvCbJlQ,251895
11901
11902
  tccli/services/ocr/v20181119/api.json,sha256=RfUG97cUeIKZGBDC-gwvDFb2wis0mIg52Fbccb8E7Ak,679609
@@ -12278,8 +12279,8 @@ tccli/services/yunsou/v20180504/api.json,sha256=2808fil5p3pTEJ3SqXEEq7eSrASZOiv8
12278
12279
  tccli/services/yunsou/v20180504/examples.json,sha256=Jg4WuqS_Wxl7eTBMbzjem65FuUZQi3qq3xtlBNFZlTU,11870
12279
12280
  tccli/services/yunsou/v20191115/api.json,sha256=Dyfl3mC3NXGFINdyU_vxC-86gQe40YLOWjKkSK7XA2U,15708
12280
12281
  tccli/services/yunsou/v20191115/examples.json,sha256=vN5MzexHVPMckm4MbnXNiOe3KKiVchvf4_uLpjOskuk,3983
12281
- tccli-3.0.1015.1.dist-info/METADATA,sha256=TK8AktajxF2A3XN1K6va_2ZBhUfPmu1uFVIGnxoZc9M,16172
12282
- tccli-3.0.1015.1.dist-info/WHEEL,sha256=HyPWovjK_wfsxZqVnw7Bu5rgKxNh3Nm__lHm0ALDcb4,101
12283
- tccli-3.0.1015.1.dist-info/entry_points.txt,sha256=9ZzsXxi7Xj3ZneT7VxRVJpFvnmdEOeysh999_0gWVvo,85
12284
- tccli-3.0.1015.1.dist-info/license_files/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12285
- tccli-3.0.1015.1.dist-info/RECORD,,
12282
+ tccli-3.0.1016.1.dist-info/METADATA,sha256=ywOu-u6BBfUhpVa0XQ4xCljs_CoE7kTw5amPisbezG8,16172
12283
+ tccli-3.0.1016.1.dist-info/WHEEL,sha256=HyPWovjK_wfsxZqVnw7Bu5rgKxNh3Nm__lHm0ALDcb4,101
12284
+ tccli-3.0.1016.1.dist-info/entry_points.txt,sha256=9ZzsXxi7Xj3ZneT7VxRVJpFvnmdEOeysh999_0gWVvo,85
12285
+ tccli-3.0.1016.1.dist-info/license_files/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12286
+ tccli-3.0.1016.1.dist-info/RECORD,,