tccli 3.0.1065.1__py2.py3-none-any.whl → 3.0.1067.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/examples/csip/v20221121/DescribeTopAttackInfo.md +26 -0
- tccli/examples/omics/v20221128/CreateVolume.md +25 -0
- tccli/examples/omics/v20221128/DeleteVolume.md +20 -0
- tccli/examples/omics/v20221128/DeleteVolumeData.md +21 -0
- tccli/examples/omics/v20221128/DescribeVolumes.md +37 -0
- tccli/examples/omics/v20221128/ModifyVolume.md +21 -0
- tccli/examples/tse/v20201207/CreateGovernanceInstances.md +32 -0
- tccli/examples/tse/v20201207/DeleteGovernanceInstances.md +35 -0
- tccli/examples/tse/v20201207/DescribeGovernanceInstances.md +56 -0
- tccli/examples/tse/v20201207/ModifyGovernanceInstances.md +35 -0
- tccli/services/ckafka/v20190819/api.json +17 -17
- tccli/services/csip/csip_client.py +57 -4
- tccli/services/csip/v20221121/api.json +70 -0
- tccli/services/csip/v20221121/examples.json +8 -0
- tccli/services/ess/v20201111/api.json +2 -2
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/iotvideo/v20211125/api.json +1 -1
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/monitor/v20180724/api.json +20 -0
- tccli/services/omics/omics_client.py +277 -12
- tccli/services/omics/v20221128/api.json +425 -0
- tccli/services/omics/v20221128/examples.json +40 -0
- tccli/services/trp/v20210515/api.json +18 -0
- tccli/services/tse/tse_client.py +220 -8
- tccli/services/tse/v20201207/api.json +779 -42
- tccli/services/tse/v20201207/examples.json +32 -0
- {tccli-3.0.1065.1.dist-info → tccli-3.0.1067.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1065.1.dist-info → tccli-3.0.1067.1.dist-info}/RECORD +32 -22
- {tccli-3.0.1065.1.dist-info → tccli-3.0.1067.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1065.1.dist-info → tccli-3.0.1067.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1065.1.dist-info → tccli-3.0.1067.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1067.1'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
**Example 1: 查询TOP攻击信息示例**
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli csip DescribeTopAttackInfo --cli-unfold-argument \
|
9
|
+
--OperatedMemberId abc
|
10
|
+
```
|
11
|
+
|
12
|
+
Output:
|
13
|
+
```
|
14
|
+
{
|
15
|
+
"Response": {
|
16
|
+
"TopAttackInfo": [
|
17
|
+
{
|
18
|
+
"Name": "漏洞攻击",
|
19
|
+
"Count": 123
|
20
|
+
}
|
21
|
+
],
|
22
|
+
"RequestId": "abc"
|
23
|
+
}
|
24
|
+
}
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
**Example 1: 创建缓存卷**
|
2
|
+
|
3
|
+
创建缓存卷。
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli omics CreateVolume --cli-unfold-argument \
|
9
|
+
--EnvironmentId menv-ry46eloh \
|
10
|
+
--Name 测试缓存就 \
|
11
|
+
--Type SHARED \
|
12
|
+
--Spec HP \
|
13
|
+
--Capacity 0
|
14
|
+
```
|
15
|
+
|
16
|
+
Output:
|
17
|
+
```
|
18
|
+
{
|
19
|
+
"Response": {
|
20
|
+
"RequestId": "d79c957c-adca-4e29-81ba-1add68284e09",
|
21
|
+
"VolumeId": "vol-mpcb5xnl"
|
22
|
+
}
|
23
|
+
}
|
24
|
+
```
|
25
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
**Example 1: 删除缓存卷**
|
2
|
+
|
3
|
+
删除缓存卷。
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli omics DeleteVolume --cli-unfold-argument \
|
9
|
+
--VolumeId vol-mpcb5xnl
|
10
|
+
```
|
11
|
+
|
12
|
+
Output:
|
13
|
+
```
|
14
|
+
{
|
15
|
+
"Response": {
|
16
|
+
"RequestId": "6b900d9e-26bc-4d91-83b8-f5ade6b3a594"
|
17
|
+
}
|
18
|
+
}
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
**Example 1: 删除缓存卷数据**
|
2
|
+
|
3
|
+
删除缓存卷数据。
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli omics DeleteVolumeData --cli-unfold-argument \
|
9
|
+
--VolumeId vol-mpcb5xnl \
|
10
|
+
--Path /
|
11
|
+
```
|
12
|
+
|
13
|
+
Output:
|
14
|
+
```
|
15
|
+
{
|
16
|
+
"Response": {
|
17
|
+
"RequestId": "ef303ee0-8b7b-48e1-9663-272df381e93a"
|
18
|
+
}
|
19
|
+
}
|
20
|
+
```
|
21
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
**Example 1: 查询缓存卷列表**
|
2
|
+
|
3
|
+
查询缓存卷列表。
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli omics DescribeVolumes --cli-unfold-argument \
|
9
|
+
--EnvironmentId menv-ry46eloh
|
10
|
+
```
|
11
|
+
|
12
|
+
Output:
|
13
|
+
```
|
14
|
+
{
|
15
|
+
"Response": {
|
16
|
+
"RequestId": "f5020059-1511-4f45-ab7e-5188a78bda4b",
|
17
|
+
"TotalCount": 1,
|
18
|
+
"Volumes": [
|
19
|
+
{
|
20
|
+
"BandwidthLimit": 380,
|
21
|
+
"Capacity": 32768,
|
22
|
+
"DefaultMountPath": "/vol-8w7rfq4b",
|
23
|
+
"Description": "",
|
24
|
+
"EnvironmentId": "menv-ry46eloh",
|
25
|
+
"IsDefault": true,
|
26
|
+
"Name": "默认缓存卷(menv-ry46eloh)",
|
27
|
+
"Spec": "HP",
|
28
|
+
"Status": "AVAILABLE",
|
29
|
+
"Type": "SHARED",
|
30
|
+
"Usage": 973150879744,
|
31
|
+
"VolumeId": "vol-8w7rfq4b"
|
32
|
+
}
|
33
|
+
]
|
34
|
+
}
|
35
|
+
}
|
36
|
+
```
|
37
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
**Example 1: 修改缓存卷**
|
2
|
+
|
3
|
+
修改缓存卷。
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli omics ModifyVolume --cli-unfold-argument \
|
9
|
+
--VolumeId vol-mpcb5xnl \
|
10
|
+
--Name 新名称
|
11
|
+
```
|
12
|
+
|
13
|
+
Output:
|
14
|
+
```
|
15
|
+
{
|
16
|
+
"Response": {
|
17
|
+
"RequestId": "7ad01102-de15-43fb-8de3-02b0107cf08c"
|
18
|
+
}
|
19
|
+
}
|
20
|
+
```
|
21
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
**Example 1: 创建治理中心服务实例**
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli tse CreateGovernanceInstances --cli-unfold-argument \
|
9
|
+
--InstanceId xx \
|
10
|
+
--GovernanceInstances.0.Protocol xx \
|
11
|
+
--GovernanceInstances.0.Service xx \
|
12
|
+
--GovernanceInstances.0.Weight 1 \
|
13
|
+
--GovernanceInstances.0.Healthy True \
|
14
|
+
--GovernanceInstances.0.Namespace xx \
|
15
|
+
--GovernanceInstances.0.Isolate True \
|
16
|
+
--GovernanceInstances.0.EnableHealthCheck True \
|
17
|
+
--GovernanceInstances.0.Host xx \
|
18
|
+
--GovernanceInstances.0.Ttl 1 \
|
19
|
+
--GovernanceInstances.0.InstanceVersion xx \
|
20
|
+
--GovernanceInstances.0.Port 1
|
21
|
+
```
|
22
|
+
|
23
|
+
Output:
|
24
|
+
```
|
25
|
+
{
|
26
|
+
"Response": {
|
27
|
+
"Result": true,
|
28
|
+
"RequestId": "xx"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
```
|
32
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
**Example 1: 删除治理中心服务实例**
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli tse DeleteGovernanceInstances --cli-unfold-argument \
|
9
|
+
--InstanceId xx \
|
10
|
+
--GovernanceInstances.0.Protocol xx \
|
11
|
+
--GovernanceInstances.0.Service xx \
|
12
|
+
--GovernanceInstances.0.Weight 1 \
|
13
|
+
--GovernanceInstances.0.Healthy True \
|
14
|
+
--GovernanceInstances.0.Namespace xx \
|
15
|
+
--GovernanceInstances.0.Isolate True \
|
16
|
+
--GovernanceInstances.0.Id xx \
|
17
|
+
--GovernanceInstances.0.EnableHealthCheck True \
|
18
|
+
--GovernanceInstances.0.Host xx \
|
19
|
+
--GovernanceInstances.0.Ttl 1 \
|
20
|
+
--GovernanceInstances.0.InstanceVersion xx \
|
21
|
+
--GovernanceInstances.0.Port 1 \
|
22
|
+
--GovernanceInstances.0.Metadatas.0.Value xx \
|
23
|
+
--GovernanceInstances.0.Metadatas.0.Key xx
|
24
|
+
```
|
25
|
+
|
26
|
+
Output:
|
27
|
+
```
|
28
|
+
{
|
29
|
+
"Response": {
|
30
|
+
"Result": true,
|
31
|
+
"RequestId": "xx"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
```
|
35
|
+
|
@@ -0,0 +1,56 @@
|
|
1
|
+
**Example 1: 查询治理中心服务实例**
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli tse DescribeGovernanceInstances --cli-unfold-argument \
|
9
|
+
--Protocol xx \
|
10
|
+
--Service xx \
|
11
|
+
--InstanceId xx \
|
12
|
+
--Isolate True \
|
13
|
+
--Namespace xx \
|
14
|
+
--Host xx \
|
15
|
+
--HealthStatus True \
|
16
|
+
--Offset 1 \
|
17
|
+
--InstanceVersion xx \
|
18
|
+
--Limit 1 \
|
19
|
+
--Metadatas.0.Value xx \
|
20
|
+
--Metadatas.0.Key xx
|
21
|
+
```
|
22
|
+
|
23
|
+
Output:
|
24
|
+
```
|
25
|
+
{
|
26
|
+
"Response": {
|
27
|
+
"Content": [
|
28
|
+
{
|
29
|
+
"Protocol": "xx",
|
30
|
+
"Weight": 1,
|
31
|
+
"Service": "xx",
|
32
|
+
"EnableHealthCheck": true,
|
33
|
+
"Isolate": true,
|
34
|
+
"Ttl": 1,
|
35
|
+
"Namespace": "xx",
|
36
|
+
"Id": "xx",
|
37
|
+
"Healthy": true,
|
38
|
+
"Host": "xx",
|
39
|
+
"Version": "xx",
|
40
|
+
"ModifyTime": "xx",
|
41
|
+
"Port": 1,
|
42
|
+
"CreateTime": "xx",
|
43
|
+
"Metadatas": [
|
44
|
+
{
|
45
|
+
"Value": "xx",
|
46
|
+
"Key": "xx"
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
50
|
+
],
|
51
|
+
"TotalCount": 1,
|
52
|
+
"RequestId": "xx"
|
53
|
+
}
|
54
|
+
}
|
55
|
+
```
|
56
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
**Example 1: 修改治理中心服务实例**
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli tse ModifyGovernanceInstances --cli-unfold-argument \
|
9
|
+
--InstanceId xx \
|
10
|
+
--GovernanceInstances.0.Protocol xx \
|
11
|
+
--GovernanceInstances.0.Service xx \
|
12
|
+
--GovernanceInstances.0.Weight 1 \
|
13
|
+
--GovernanceInstances.0.Healthy True \
|
14
|
+
--GovernanceInstances.0.Namespace xx \
|
15
|
+
--GovernanceInstances.0.Isolate True \
|
16
|
+
--GovernanceInstances.0.Id xx \
|
17
|
+
--GovernanceInstances.0.EnableHealthCheck True \
|
18
|
+
--GovernanceInstances.0.Host xx \
|
19
|
+
--GovernanceInstances.0.Ttl 1 \
|
20
|
+
--GovernanceInstances.0.InstanceVersion xx \
|
21
|
+
--GovernanceInstances.0.Port 1 \
|
22
|
+
--GovernanceInstances.0.Metadatas.0.Value xx \
|
23
|
+
--GovernanceInstances.0.Metadatas.0.Key xx
|
24
|
+
```
|
25
|
+
|
26
|
+
Output:
|
27
|
+
```
|
28
|
+
{
|
29
|
+
"Response": {
|
30
|
+
"Result": true,
|
31
|
+
"RequestId": "xx"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
```
|
35
|
+
|
@@ -3751,7 +3751,7 @@
|
|
3751
3751
|
},
|
3752
3752
|
{
|
3753
3753
|
"disabled": false,
|
3754
|
-
"document": "实例类型: [标准版实例]填写 \"standard\" (默认), [专业版实例]填写 \"profession\"",
|
3754
|
+
"document": "实例类型: [标准版实例]填写 \"standard\" (默认), [专业版实例]填写 \"profession\",[高级版实例]填写\"premium\"",
|
3755
3755
|
"example": "profession",
|
3756
3756
|
"member": "string",
|
3757
3757
|
"name": "SpecificationsType",
|
@@ -3796,7 +3796,7 @@
|
|
3796
3796
|
},
|
3797
3797
|
{
|
3798
3798
|
"disabled": false,
|
3799
|
-
"document": "
|
3799
|
+
"document": "专业版/高级版实例磁盘类型,标准版实例不需要填写。\"CLOUD_SSD\":SSD云硬盘;\"CLOUD_BASIC\":高性能云硬盘。不传默认为 \"CLOUD_BASIC\"",
|
3800
3800
|
"example": "CLOUD_SSD",
|
3801
3801
|
"member": "string",
|
3802
3802
|
"name": "DiskType",
|
@@ -10313,7 +10313,7 @@
|
|
10313
10313
|
"members": [
|
10314
10314
|
{
|
10315
10315
|
"disabled": false,
|
10316
|
-
"document": "国内站标准版填写standards2, 国际站标准版填写standard
|
10316
|
+
"document": "国内站标准版填写standards2, 国际站标准版填写standard,专业版填写profession,高级版填写premium",
|
10317
10317
|
"example": "profession",
|
10318
10318
|
"member": "string",
|
10319
10319
|
"name": "InstanceType",
|
@@ -10340,7 +10340,7 @@
|
|
10340
10340
|
},
|
10341
10341
|
{
|
10342
10342
|
"disabled": false,
|
10343
|
-
"document": "实例内网带宽大小, 单位MB/s (
|
10343
|
+
"document": "实例内网带宽大小, 单位MB/s (购买时必填,专业版/高级版询价时带宽信息必填)",
|
10344
10344
|
"example": "40",
|
10345
10345
|
"member": "int64",
|
10346
10346
|
"name": "Bandwidth",
|
@@ -10349,7 +10349,7 @@
|
|
10349
10349
|
},
|
10350
10350
|
{
|
10351
10351
|
"disabled": false,
|
10352
|
-
"document": "实例的硬盘购买类型以及大小 (
|
10352
|
+
"document": "实例的硬盘购买类型以及大小 (购买时必填,专业版/高级版询价时磁盘信息必填)",
|
10353
10353
|
"example": "{\"DiskType\":\"SSD\", \"DiskSize\": 500}",
|
10354
10354
|
"member": "InquiryDiskParam",
|
10355
10355
|
"name": "InquiryDiskParam",
|
@@ -10376,7 +10376,7 @@
|
|
10376
10376
|
},
|
10377
10377
|
{
|
10378
10378
|
"disabled": false,
|
10379
|
-
"document": "购买实例分区数, 单位个 (
|
10379
|
+
"document": "购买实例分区数, 单位个 (购买时必填,专业版/高级版询价时带宽信息必填)",
|
10380
10380
|
"example": "40",
|
10381
10381
|
"member": "int64",
|
10382
10382
|
"name": "Partition",
|
@@ -10488,7 +10488,7 @@
|
|
10488
10488
|
"example": "1.0",
|
10489
10489
|
"member": "float",
|
10490
10490
|
"name": "UnitPrice",
|
10491
|
-
"
|
10491
|
+
"output_required": true,
|
10492
10492
|
"type": "float",
|
10493
10493
|
"value_allowed_null": true
|
10494
10494
|
},
|
@@ -10498,7 +10498,7 @@
|
|
10498
10498
|
"example": "1.0",
|
10499
10499
|
"member": "float",
|
10500
10500
|
"name": "UnitPriceDiscount",
|
10501
|
-
"
|
10501
|
+
"output_required": true,
|
10502
10502
|
"type": "float",
|
10503
10503
|
"value_allowed_null": true
|
10504
10504
|
},
|
@@ -10508,7 +10508,7 @@
|
|
10508
10508
|
"example": "1.0",
|
10509
10509
|
"member": "float",
|
10510
10510
|
"name": "OriginalPrice",
|
10511
|
-
"
|
10511
|
+
"output_required": true,
|
10512
10512
|
"type": "float",
|
10513
10513
|
"value_allowed_null": true
|
10514
10514
|
},
|
@@ -10518,7 +10518,7 @@
|
|
10518
10518
|
"example": "1.0",
|
10519
10519
|
"member": "float",
|
10520
10520
|
"name": "DiscountPrice",
|
10521
|
-
"
|
10521
|
+
"output_required": true,
|
10522
10522
|
"type": "float",
|
10523
10523
|
"value_allowed_null": true
|
10524
10524
|
},
|
@@ -10528,7 +10528,7 @@
|
|
10528
10528
|
"example": "100.0",
|
10529
10529
|
"member": "float",
|
10530
10530
|
"name": "Discount",
|
10531
|
-
"
|
10531
|
+
"output_required": true,
|
10532
10532
|
"type": "float",
|
10533
10533
|
"value_allowed_null": true
|
10534
10534
|
},
|
@@ -10538,7 +10538,7 @@
|
|
10538
10538
|
"example": "1",
|
10539
10539
|
"member": "int64",
|
10540
10540
|
"name": "GoodsNum",
|
10541
|
-
"
|
10541
|
+
"output_required": true,
|
10542
10542
|
"type": "int",
|
10543
10543
|
"value_allowed_null": true
|
10544
10544
|
},
|
@@ -10548,7 +10548,7 @@
|
|
10548
10548
|
"example": "CNY",
|
10549
10549
|
"member": "string",
|
10550
10550
|
"name": "Currency",
|
10551
|
-
"
|
10551
|
+
"output_required": true,
|
10552
10552
|
"type": "string",
|
10553
10553
|
"value_allowed_null": true
|
10554
10554
|
},
|
@@ -10558,7 +10558,7 @@
|
|
10558
10558
|
"example": "SSD",
|
10559
10559
|
"member": "string",
|
10560
10560
|
"name": "DiskType",
|
10561
|
-
"
|
10561
|
+
"output_required": true,
|
10562
10562
|
"type": "string",
|
10563
10563
|
"value_allowed_null": true
|
10564
10564
|
},
|
@@ -10568,7 +10568,7 @@
|
|
10568
10568
|
"example": "1",
|
10569
10569
|
"member": "int64",
|
10570
10570
|
"name": "TimeSpan",
|
10571
|
-
"
|
10571
|
+
"output_required": true,
|
10572
10572
|
"type": "int",
|
10573
10573
|
"value_allowed_null": true
|
10574
10574
|
},
|
@@ -10578,7 +10578,7 @@
|
|
10578
10578
|
"example": "m",
|
10579
10579
|
"member": "string",
|
10580
10580
|
"name": "TimeUnit",
|
10581
|
-
"
|
10581
|
+
"output_required": true,
|
10582
10582
|
"type": "string",
|
10583
10583
|
"value_allowed_null": true
|
10584
10584
|
},
|
@@ -10588,7 +10588,7 @@
|
|
10588
10588
|
"example": "100",
|
10589
10589
|
"member": "int64",
|
10590
10590
|
"name": "Value",
|
10591
|
-
"
|
10591
|
+
"output_required": true,
|
10592
10592
|
"type": "int",
|
10593
10593
|
"value_allowed_null": true
|
10594
10594
|
}
|
@@ -485,6 +485,58 @@ def doDescribeListenerList(args, parsed_globals):
|
|
485
485
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
486
|
|
487
487
|
|
488
|
+
def doDescribeOrganizationUserInfo(args, parsed_globals):
|
489
|
+
g_param = parse_global_arg(parsed_globals)
|
490
|
+
|
491
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
492
|
+
cred = credential.CVMRoleCredential()
|
493
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
494
|
+
cred = credential.STSAssumeRoleCredential(
|
495
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
496
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
497
|
+
)
|
498
|
+
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):
|
499
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
500
|
+
else:
|
501
|
+
cred = credential.Credential(
|
502
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
503
|
+
)
|
504
|
+
http_profile = HttpProfile(
|
505
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
506
|
+
reqMethod="POST",
|
507
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
508
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
509
|
+
)
|
510
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
511
|
+
if g_param[OptionsDefine.Language]:
|
512
|
+
profile.language = g_param[OptionsDefine.Language]
|
513
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
514
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
515
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
516
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
+
model = models.DescribeOrganizationUserInfoRequest()
|
518
|
+
model.from_json_string(json.dumps(args))
|
519
|
+
start_time = time.time()
|
520
|
+
while True:
|
521
|
+
rsp = client.DescribeOrganizationUserInfo(model)
|
522
|
+
result = rsp.to_json_string()
|
523
|
+
try:
|
524
|
+
json_obj = json.loads(result)
|
525
|
+
except TypeError as e:
|
526
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
527
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
528
|
+
break
|
529
|
+
cur_time = time.time()
|
530
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
531
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
532
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
533
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
534
|
+
else:
|
535
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
536
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
537
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
|
+
|
539
|
+
|
488
540
|
def doDeleteRiskScanTask(args, parsed_globals):
|
489
541
|
g_param = parse_global_arg(parsed_globals)
|
490
542
|
|
@@ -1733,7 +1785,7 @@ def doModifyOrganizationAccountStatus(args, parsed_globals):
|
|
1733
1785
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1734
1786
|
|
1735
1787
|
|
1736
|
-
def
|
1788
|
+
def doDescribeTopAttackInfo(args, parsed_globals):
|
1737
1789
|
g_param = parse_global_arg(parsed_globals)
|
1738
1790
|
|
1739
1791
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1762,11 +1814,11 @@ def doDescribeOrganizationUserInfo(args, parsed_globals):
|
|
1762
1814
|
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
1763
1815
|
client._sdkVersion += ("_CLI_" + __version__)
|
1764
1816
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1765
|
-
model = models.
|
1817
|
+
model = models.DescribeTopAttackInfoRequest()
|
1766
1818
|
model.from_json_string(json.dumps(args))
|
1767
1819
|
start_time = time.time()
|
1768
1820
|
while True:
|
1769
|
-
rsp = client.
|
1821
|
+
rsp = client.DescribeTopAttackInfo(model)
|
1770
1822
|
result = rsp.to_json_string()
|
1771
1823
|
try:
|
1772
1824
|
json_obj = json.loads(result)
|
@@ -1909,6 +1961,7 @@ ACTION_MAP = {
|
|
1909
1961
|
"AddNewBindRoleUser": doAddNewBindRoleUser,
|
1910
1962
|
"DescribeSubnetAssets": doDescribeSubnetAssets,
|
1911
1963
|
"DescribeListenerList": doDescribeListenerList,
|
1964
|
+
"DescribeOrganizationUserInfo": doDescribeOrganizationUserInfo,
|
1912
1965
|
"DeleteRiskScanTask": doDeleteRiskScanTask,
|
1913
1966
|
"DescribeRiskCenterAssetViewWeakPasswordRiskList": doDescribeRiskCenterAssetViewWeakPasswordRiskList,
|
1914
1967
|
"DescribeRiskCenterAssetViewVULRiskList": doDescribeRiskCenterAssetViewVULRiskList,
|
@@ -1933,7 +1986,7 @@ ACTION_MAP = {
|
|
1933
1986
|
"DescribeVULRiskAdvanceCFGList": doDescribeVULRiskAdvanceCFGList,
|
1934
1987
|
"ModifyRiskCenterRiskStatus": doModifyRiskCenterRiskStatus,
|
1935
1988
|
"ModifyOrganizationAccountStatus": doModifyOrganizationAccountStatus,
|
1936
|
-
"
|
1989
|
+
"DescribeTopAttackInfo": doDescribeTopAttackInfo,
|
1937
1990
|
"DescribeTaskLogURL": doDescribeTaskLogURL,
|
1938
1991
|
"DescribeCVMAssetInfo": doDescribeCVMAssetInfo,
|
1939
1992
|
|
@@ -210,6 +210,13 @@
|
|
210
210
|
"output": "DescribeTaskLogURLResponse",
|
211
211
|
"status": "online"
|
212
212
|
},
|
213
|
+
"DescribeTopAttackInfo": {
|
214
|
+
"document": "查询TOP攻击信息",
|
215
|
+
"input": "DescribeTopAttackInfoRequest",
|
216
|
+
"name": "查询TOP攻击信息",
|
217
|
+
"output": "DescribeTopAttackInfoResponse",
|
218
|
+
"status": "online"
|
219
|
+
},
|
213
220
|
"DescribeVULRiskAdvanceCFGList": {
|
214
221
|
"document": "查询漏洞风险高级配置",
|
215
222
|
"input": "DescribeVULRiskAdvanceCFGListRequest",
|
@@ -5775,6 +5782,43 @@
|
|
5775
5782
|
],
|
5776
5783
|
"type": "object"
|
5777
5784
|
},
|
5785
|
+
"DescribeTopAttackInfoRequest": {
|
5786
|
+
"document": "DescribeTopAttackInfo请求参数结构体",
|
5787
|
+
"members": [
|
5788
|
+
{
|
5789
|
+
"disabled": false,
|
5790
|
+
"document": "被调用的集团账号的成员id",
|
5791
|
+
"example": "[]{\"mem-6wfo0fzks3\",\"mem-85fo0fzks4\"}",
|
5792
|
+
"member": "string",
|
5793
|
+
"name": "OperatedMemberId",
|
5794
|
+
"required": false,
|
5795
|
+
"type": "list"
|
5796
|
+
}
|
5797
|
+
],
|
5798
|
+
"type": "object"
|
5799
|
+
},
|
5800
|
+
"DescribeTopAttackInfoResponse": {
|
5801
|
+
"document": "DescribeTopAttackInfo返回参数结构体",
|
5802
|
+
"members": [
|
5803
|
+
{
|
5804
|
+
"disabled": false,
|
5805
|
+
"document": "Top攻击类型/攻击者次数",
|
5806
|
+
"example": "漏洞攻击:1234",
|
5807
|
+
"member": "TagCount",
|
5808
|
+
"name": "TopAttackInfo",
|
5809
|
+
"output_required": true,
|
5810
|
+
"type": "list",
|
5811
|
+
"value_allowed_null": false
|
5812
|
+
},
|
5813
|
+
{
|
5814
|
+
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
5815
|
+
"member": "string",
|
5816
|
+
"name": "RequestId",
|
5817
|
+
"type": "string"
|
5818
|
+
}
|
5819
|
+
],
|
5820
|
+
"type": "object"
|
5821
|
+
},
|
5778
5822
|
"DescribeVULRiskAdvanceCFGListRequest": {
|
5779
5823
|
"document": "DescribeVULRiskAdvanceCFGList请求参数结构体",
|
5780
5824
|
"members": [
|
@@ -9258,6 +9302,32 @@
|
|
9258
9302
|
],
|
9259
9303
|
"usage": "both"
|
9260
9304
|
},
|
9305
|
+
"TagCount": {
|
9306
|
+
"document": "产品日志条数",
|
9307
|
+
"members": [
|
9308
|
+
{
|
9309
|
+
"disabled": false,
|
9310
|
+
"document": "产品名\n注意:此字段可能返回 null,表示取不到有效值。",
|
9311
|
+
"example": "CFW",
|
9312
|
+
"member": "string",
|
9313
|
+
"name": "Name",
|
9314
|
+
"required": false,
|
9315
|
+
"type": "string",
|
9316
|
+
"value_allowed_null": true
|
9317
|
+
},
|
9318
|
+
{
|
9319
|
+
"disabled": false,
|
9320
|
+
"document": "日志条数\n注意:此字段可能返回 null,表示取不到有效值。",
|
9321
|
+
"example": "1000",
|
9322
|
+
"member": "uint64",
|
9323
|
+
"name": "Count",
|
9324
|
+
"required": false,
|
9325
|
+
"type": "int",
|
9326
|
+
"value_allowed_null": true
|
9327
|
+
}
|
9328
|
+
],
|
9329
|
+
"usage": "out"
|
9330
|
+
},
|
9261
9331
|
"Tags": {
|
9262
9332
|
"document": "主机标签信息",
|
9263
9333
|
"members": [
|
@@ -240,6 +240,14 @@
|
|
240
240
|
"title": "获取报告下载的临时链接"
|
241
241
|
}
|
242
242
|
],
|
243
|
+
"DescribeTopAttackInfo": [
|
244
|
+
{
|
245
|
+
"document": "",
|
246
|
+
"input": "POST / HTTP/1.1\nHost: csip.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTopAttackInfo\n<公共请求参数>\n\n{\n \"OperatedMemberId\": [\n \"abc\"\n ]\n}",
|
247
|
+
"output": "{\n \"Response\": {\n \"TopAttackInfo\": [\n {\n \"Name\": \"漏洞攻击\",\n \"Count\": 123\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
248
|
+
"title": "查询TOP攻击信息示例"
|
249
|
+
}
|
250
|
+
],
|
243
251
|
"DescribeVULRiskAdvanceCFGList": [
|
244
252
|
{
|
245
253
|
"document": "\t\n查询漏洞风险高级配置",
|