tccli 3.0.1348.1__py2.py3-none-any.whl → 3.0.1349.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 +1 -1
- tccli/services/__init__.py +0 -76
- tccli/services/ai3d/v20250513/api.json +1 -1
- tccli/services/aiart/v20221229/api.json +3 -3
- tccli/services/autoscaling/v20180419/api.json +11 -0
- tccli/services/batch/v20170312/api.json +44 -0
- tccli/services/cdb/v20170320/api.json +8 -8
- tccli/services/cdb/v20170320/examples.json +1 -1
- tccli/services/cdn/v20180606/api.json +5 -5
- tccli/services/cdwdoris/v20211228/api.json +145 -7
- tccli/services/cfg/v20210820/api.json +20 -0
- tccli/services/cfs/v20190719/api.json +10 -10
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +272 -0
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/csip/csip_client.py +833 -144
- tccli/services/csip/v20221121/api.json +3304 -1436
- tccli/services/csip/v20221121/examples.json +104 -0
- tccli/services/cvm/v20170312/api.json +1 -1
- tccli/services/cwp/v20180228/api.json +9 -0
- tccli/services/cwp/v20180228/examples.json +6 -0
- tccli/services/emr/v20190103/api.json +217 -2
- tccli/services/es/v20250101/api.json +22 -0
- tccli/services/ess/v20201111/api.json +10 -1
- tccli/services/essbasic/v20210526/api.json +3 -3
- tccli/services/gs/v20191118/api.json +38 -0
- tccli/services/igtm/igtm_client.py +159 -0
- tccli/services/igtm/v20231024/api.json +577 -0
- tccli/services/igtm/v20231024/examples.json +24 -0
- tccli/services/iotexplorer/v20190423/api.json +3 -3
- tccli/services/lcic/lcic_client.py +53 -0
- tccli/services/lcic/v20220817/api.json +53 -0
- tccli/services/lcic/v20220817/examples.json +8 -0
- tccli/services/live/v20180801/api.json +203 -1
- tccli/services/live/v20180801/examples.json +1 -1
- tccli/services/lke/v20231130/api.json +248 -2
- tccli/services/lke/v20231130/examples.json +1 -1
- tccli/services/lkeap/v20240522/api.json +1 -1
- tccli/services/mrs/v20200910/api.json +10 -0
- tccli/services/nlp/nlp_client.py +4 -322
- tccli/services/nlp/v20190408/api.json +0 -459
- tccli/services/nlp/v20190408/examples.json +0 -48
- tccli/services/ocr/v20181119/api.json +60 -5
- tccli/services/omics/v20221128/api.json +38 -0
- tccli/services/redis/v20180412/api.json +6 -6
- tccli/services/redis/v20180412/examples.json +1 -1
- tccli/services/ses/v20201002/api.json +100 -5
- tccli/services/tcb/v20180608/api.json +1 -1
- tccli/services/tcb/v20180608/examples.json +1 -1
- tccli/services/tdmq/v20200217/api.json +19 -0
- tccli/services/teo/teo_client.py +281 -16
- tccli/services/teo/v20220901/api.json +611 -6
- tccli/services/teo/v20220901/examples.json +48 -2
- tccli/services/tione/v20211111/api.json +16 -0
- tccli/services/tke/tke_client.py +57 -4
- tccli/services/tke/v20180525/api.json +24 -24
- tccli/services/tke/v20220501/api.json +52 -0
- tccli/services/tke/v20220501/examples.json +8 -0
- tccli/services/tmt/v20180321/api.json +4 -4
- tccli/services/tsf/v20180326/api.json +4 -4
- tccli/services/vclm/v20240523/api.json +3 -3
- tccli/services/vod/v20180717/api.json +5 -5
- tccli/services/vod/v20180717/examples.json +9 -9
- tccli/services/vpc/v20170312/api.json +1 -1
- tccli/services/vrs/v20200824/api.json +1 -1
- {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/RECORD +70 -172
- tccli/services/cis/__init__.py +0 -4
- tccli/services/cis/cis_client.py +0 -525
- tccli/services/cis/v20180408/api.json +0 -737
- tccli/services/cis/v20180408/examples.json +0 -93
- tccli/services/dataintegration/__init__.py +0 -4
- tccli/services/dataintegration/dataintegration_client.py +0 -207
- tccli/services/dataintegration/v20220613/api.json +0 -87
- tccli/services/dataintegration/v20220613/examples.json +0 -13
- tccli/services/dtf/__init__.py +0 -4
- tccli/services/dtf/dtf_client.py +0 -207
- tccli/services/dtf/v20200506/api.json +0 -274
- tccli/services/dtf/v20200506/examples.json +0 -13
- tccli/services/gpm/__init__.py +0 -4
- tccli/services/gpm/gpm_client.py +0 -1108
- tccli/services/gpm/v20200820/api.json +0 -1959
- tccli/services/gpm/v20200820/examples.json +0 -149
- tccli/services/gse/__init__.py +0 -4
- tccli/services/gse/gse_client.py +0 -4076
- tccli/services/gse/v20191112/api.json +0 -7095
- tccli/services/gse/v20191112/examples.json +0 -615
- tccli/services/iecp/__init__.py +0 -4
- tccli/services/iecp/iecp_client.py +0 -4500
- tccli/services/iecp/v20210914/api.json +0 -9770
- tccli/services/iecp/v20210914/examples.json +0 -691
- tccli/services/iir/__init__.py +0 -4
- tccli/services/iir/iir_client.py +0 -207
- tccli/services/iir/v20200417/api.json +0 -204
- tccli/services/iir/v20200417/examples.json +0 -13
- tccli/services/iottid/__init__.py +0 -4
- tccli/services/iottid/iottid_client.py +0 -631
- tccli/services/iottid/v20190411/api.json +0 -553
- tccli/services/iottid/v20190411/examples.json +0 -95
- tccli/services/mgobe/__init__.py +0 -4
- tccli/services/mgobe/mgobe_client.py +0 -530
- tccli/services/mgobe/v20190929/api.json +0 -52
- tccli/services/mgobe/v20190929/examples.json +0 -13
- tccli/services/mgobe/v20201014/api.json +0 -671
- tccli/services/mgobe/v20201014/examples.json +0 -61
- tccli/services/mvj/__init__.py +0 -4
- tccli/services/mvj/mvj_client.py +0 -207
- tccli/services/mvj/v20190926/api.json +0 -123
- tccli/services/mvj/v20190926/examples.json +0 -19
- tccli/services/pds/__init__.py +0 -4
- tccli/services/pds/pds_client.py +0 -260
- tccli/services/pds/v20210701/api.json +0 -193
- tccli/services/pds/v20210701/examples.json +0 -21
- tccli/services/smpn/__init__.py +0 -4
- tccli/services/smpn/smpn_client.py +0 -260
- tccli/services/smpn/v20190822/api.json +0 -191
- tccli/services/smpn/v20190822/examples.json +0 -21
- tccli/services/solar/__init__.py +0 -4
- tccli/services/solar/solar_client.py +0 -1055
- tccli/services/solar/v20181011/api.json +0 -1760
- tccli/services/solar/v20181011/examples.json +0 -125
- tccli/services/tan/__init__.py +0 -4
- tccli/services/tan/tan_client.py +0 -207
- tccli/services/tan/v20220420/api.json +0 -65
- tccli/services/tan/v20220420/examples.json +0 -19
- tccli/services/tav/__init__.py +0 -4
- tccli/services/tav/tav_client.py +0 -366
- tccli/services/tav/v20190118/api.json +0 -262
- tccli/services/tav/v20190118/examples.json +0 -37
- tccli/services/tbm/__init__.py +0 -4
- tccli/services/tbm/tbm_client.py +0 -631
- tccli/services/tbm/v20180129/api.json +0 -1037
- tccli/services/tbm/v20180129/examples.json +0 -77
- tccli/services/tcex/__init__.py +0 -4
- tccli/services/tcex/tcex_client.py +0 -260
- tccli/services/tcex/v20200727/api.json +0 -158
- tccli/services/tcex/v20200727/examples.json +0 -21
- tccli/services/tci/__init__.py +0 -4
- tccli/services/tci/tci_client.py +0 -2327
- tccli/services/tci/v20190318/api.json +0 -4958
- tccli/services/tci/v20190318/examples.json +0 -333
- tccli/services/tic/__init__.py +0 -4
- tccli/services/tic/tic_client.py +0 -843
- tccli/services/tic/v20201117/api.json +0 -1067
- tccli/services/tic/v20201117/examples.json +0 -121
- tccli/services/ticm/__init__.py +0 -4
- tccli/services/ticm/ticm_client.py +0 -313
- tccli/services/ticm/v20181127/api.json +0 -1391
- tccli/services/ticm/v20181127/examples.json +0 -53
- tccli/services/tics/__init__.py +0 -4
- tccli/services/tics/tics_client.py +0 -366
- tccli/services/tics/v20181115/api.json +0 -694
- tccli/services/tics/v20181115/examples.json +0 -37
- tccli/services/tiems/__init__.py +0 -4
- tccli/services/tiems/tiems_client.py +0 -1479
- tccli/services/tiems/v20190416/api.json +0 -3144
- tccli/services/tiems/v20190416/examples.json +0 -217
- tccli/services/trdp/__init__.py +0 -4
- tccli/services/trdp/trdp_client.py +0 -207
- tccli/services/trdp/v20220726/api.json +0 -843
- tccli/services/trdp/v20220726/examples.json +0 -13
- tccli/services/ump/__init__.py +0 -4
- tccli/services/ump/ump_client.py +0 -1055
- tccli/services/ump/v20200918/api.json +0 -2168
- tccli/services/ump/v20200918/examples.json +0 -141
- tccli/services/youmall/__init__.py +0 -4
- tccli/services/youmall/v20180228/api.json +0 -3572
- tccli/services/youmall/v20180228/examples.json +0 -313
- tccli/services/youmall/youmall_client.py +0 -1797
- {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,93 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"actions": {
|
3
|
-
"CreateContainerInstance": [
|
4
|
-
{
|
5
|
-
"document": "",
|
6
|
-
"input": "https://cis.tencentcloudapi.com/?Action=CreateContainerInstance\r\n&Zone=ap-chengdu-1\r\n&VpcId=vpc-mjmab5g2\r\n&SubnetId=subnet-bwyqjag9\r\n&InstanceName=cis-dev\r\n&RestartPolicy=Never\r\n&Containers.0.Name=sshd\r\n&Containers.0.Image=jdeathe/centos-ssh:centos-7\r\n&Containers.0.Cpu=0.25\r\n&Containers.0.Memory=0.25\r\n&<公共请求参数>",
|
7
|
-
"output": "{\r\n \"Response\": {\r\n \"InstanceId\": \"cis-abcdefgh\",\r\n \"RequestId\": \"701c8a35-ed66-fc79-3795-5a1fa72cdbf1\"\r\n }\r\n}",
|
8
|
-
"title": "创建实例名称为cis-dev的容器实例"
|
9
|
-
}
|
10
|
-
],
|
11
|
-
"CreateContainerInstanceInternal": [
|
12
|
-
{
|
13
|
-
"document": "",
|
14
|
-
"input": "https://cis.tencentcloudapi.com/?Action=CreateContainerInstanceInternal\r\n&Zone=ap-chengdu-1\r\n&VpcId=vpc-mjmab5g2\r\n&SubnetId=subnet-bwyqjag9\r\n&InstanceName=cis-dev\r\n&RestartPolicy=Never\r\n&Containers.0.Name=sshd\r\n&Containers.0.Image=jdeathe/centos-ssh:centos-7\r\n&Containers.0.Cpu=0.25\r\n&Containers.0.Memory=0.25\r\n&<公共请求参数>",
|
15
|
-
"output": "{\r\n \"Response\": {\r\n \"InstanceId\": \"cis-abcdefgh\",\r\n \"RequestId\": \"701c8a35-ed66-fc79-3795-5a1fa72cdbf1\"\r\n }\r\n}",
|
16
|
-
"title": "创建实例名称为cis-dev的容器实例"
|
17
|
-
}
|
18
|
-
],
|
19
|
-
"DeleteContainerInstance": [
|
20
|
-
{
|
21
|
-
"document": "",
|
22
|
-
"input": "https://cis.tencentcloudapi.com/?Action=DeleteContainerInstance\r\n&InstanceName=cis-dev\r\n&<公共请求参数>",
|
23
|
-
"output": "{\r\n \"Response\": {\r\n \"Msg\": \"cis-dev has beed deleted\",\r\n \"RequestId\": \"12345\"\r\n }\r\n}",
|
24
|
-
"title": "删除容器实例cis-dev"
|
25
|
-
}
|
26
|
-
],
|
27
|
-
"DeleteContainerInstanceInternal": [
|
28
|
-
{
|
29
|
-
"document": "",
|
30
|
-
"input": "https://cis.tencentcloudapi.com/?Action=DeleteContainerInstanceInternal\r\n&InstanceName=cis-dev\r\n&<公共请求参数>",
|
31
|
-
"output": "{\r\n \"Response\": {\r\n \"Msg\": \"cis-dev has beed deleted\",\r\n \"RequestId\": \"12345\"\r\n }\r\n}",
|
32
|
-
"title": "删除容器实例cis-dev"
|
33
|
-
}
|
34
|
-
],
|
35
|
-
"DescribeContainerInstance": [
|
36
|
-
{
|
37
|
-
"document": "",
|
38
|
-
"input": "https://cis.tencentcloudapi.com/?Action=DescribeContainerInstance\r\n&InstanceName=sshdlog\r\n&<公共请求参数>",
|
39
|
-
"output": "{\r\n \"Response\": {\r\n \"ContainerInstance\": {\r\n \"InstanceId\": \"cis-1a082ocw\",\r\n \"InstanceName\": \"sshdlog\",\r\n \"Zone\": \"ap-guangzhou-4\",\r\n \"VpcId\": \"vpc-3p4hvnmx\",\r\n \"VpcName\": \"ddtest\",\r\n \"VpcCidr\": \"10.0.0.0/16\",\r\n \"SubnetId\": \"subnet-r0t1xm4e\",\r\n \"SubnetName\": \"zone4\",\r\n \"SubnetCidr\": \"10.0.2.0/24\",\r\n \"CreateTime\": \"2018-05-18 14:33:40\",\r\n \"RestartPolicy\": \"Never\",\r\n \"State\": \"Running\",\r\n \"StartTime\": \"2018-05-18 14:33:40\",\r\n \"LanIp\": \"10.0.2.20\",\r\n \"Containers\": [\r\n {\r\n \"Command\": null,\r\n \"Args\": null,\r\n \"EnvironmentVars\": null,\r\n \"Image\": \"jdeathe/centos-ssh:centos-7\",\r\n \"Name\": \"sshd\",\r\n \"WorkingDir\": null,\r\n \"Cpu\": 0.25,\r\n \"Memory\": 0.25,\r\n \"ContainerId\": \"c782aa6a7dd3df431ed2094256e90b82f59f39733a794ea294ed11037e4e2477\",\r\n \"RestartCount\": 0,\r\n \"CurrentState\": {\r\n \"StartTime\": \"2018-05-18 14:34:03\",\r\n \"State\": \"Running\"\r\n },\r\n \"PreviousState\": null\r\n }\r\n ]\r\n },\r\n \"RequestId\": \"07b9d257-ba2c-4a4f-b78a-600d225eb3b2\"\r\n }\r\n}",
|
40
|
-
"title": "获取容器实例sshdlogt的详细信息"
|
41
|
-
}
|
42
|
-
],
|
43
|
-
"DescribeContainerInstanceEvent": [
|
44
|
-
{
|
45
|
-
"document": "",
|
46
|
-
"input": "https://cis.tencentcloudapi.com/?Action=DescribeContainerInstanceEvent\r\n&InstanceName=cis-dev\r\n&<公共请求参数>",
|
47
|
-
"output": "{\r\n \"Response\": {\r\n \"Event\": [\r\n {\r\n \"FirstSeen\": \"2018-05-08T15:40:41.000+08:00\",\r\n \"LastSeen\": \"2018-05-08T15:40:41.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"Pulling\",\r\n \"Message\": \"pulling image \\\"jdeathe/centos-ssh:centos-7\\\"\"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-08T15:40:40.000+08:00\",\r\n \"LastSeen\": \"2018-05-08T15:40:40.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"Scheduled\",\r\n \"Message\": \"Successfully assigned cis-84e6e50a-5b36-46cf-859d-052c73b659c7 to 172.16.3.118\"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-08T15:40:44.000+08:00\",\r\n \"LastSeen\": \"2018-05-08T15:40:44.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"Pulled\",\r\n \"Message\": \"Successfully pulled image \\\"jdeathe/centos-ssh:centos-7\\\"\"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-08T15:40:44.000+08:00\",\r\n \"LastSeen\": \"2018-05-08T15:40:44.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"Started\",\r\n \"Message\": \"Started container\"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-08T15:40:44.000+08:00\",\r\n \"LastSeen\": \"2018-05-08T15:40:44.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"Created\",\r\n \"Message\": \"Created container\"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-08T15:40:40.000+08:00\",\r\n \"LastSeen\": \"2018-05-08T15:40:40.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"SuccessfulMountVolume\",\r\n \"Message\": \"MountVolume.SetUp succeeded for volume \\\"default-token-ft4dl\\\" \"\r\n }\r\n ],\r\n \"RequestId\": \"12345\"\r\n }\r\n }",
|
48
|
-
"title": "查询cis-dev容器实例事件"
|
49
|
-
}
|
50
|
-
],
|
51
|
-
"DescribeContainerInstanceEvents": [
|
52
|
-
{
|
53
|
-
"document": "",
|
54
|
-
"input": "https://cis.tencentcloudapi.com/?Action=DescribeContainerInstanceEvent\r\n&InstanceName=sshdlog\r\n&<公共请求参数>",
|
55
|
-
"output": "{\r\n \"Response\": {\r\n \"EventList\": [\r\n {\r\n \"FirstSeen\": \"2018-05-18T14:34:03.000+08:00\",\r\n \"LastSeen\": \"2018-05-18T14:34:03.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"Created\",\r\n \"Message\": \"Created container\"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-18T14:34:03.000+08:00\",\r\n \"LastSeen\": \"2018-05-18T14:34:03.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"Pulled\",\r\n \"Message\": \"Successfully pulled image \\\"jdeathe/centos-ssh:centos-7\\\"\"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-18T14:34:03.000+08:00\",\r\n \"LastSeen\": \"2018-05-18T14:34:03.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"Started\",\r\n \"Message\": \"Started container\"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-18T14:33:51.000+08:00\",\r\n \"LastSeen\": \"2018-05-18T14:33:51.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"Pulling\",\r\n \"Message\": \"pulling image \\\"jdeathe/centos-ssh:centos-7\\\"\"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-18T14:33:40.000+08:00\",\r\n \"LastSeen\": \"2018-05-18T14:33:40.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"SuccessfulMountVolume\",\r\n \"Message\": \"MountVolume.SetUp succeeded for volume \\\"default-token-mqfh6\\\" \"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-18T14:33:40.000+08:00\",\r\n \"LastSeen\": \"2018-05-18T14:33:40.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Warning\",\r\n \"Reason\": \"FailedScheduling\",\r\n \"Message\": \"No nodes are available that match all of the predicates: Insufficient memory (12), MatchInterPodAffinity (27).\"\r\n },\r\n {\r\n \"FirstSeen\": \"2018-05-18T14:33:40.000+08:00\",\r\n \"LastSeen\": \"2018-05-18T14:33:40.000+08:00\",\r\n \"Count\": \"1\",\r\n \"Level\": \"Normal\",\r\n \"Reason\": \"Scheduled\",\r\n \"Message\": \"Successfully assigned sshdlog-1a082ocw-cisapp to 10.0.20.45\"\r\n }\r\n ],\r\n \"RequestId\": \"d9b28ae4-5343-43c2-a6c1-48b716abde67\"\r\n }\r\n}",
|
56
|
-
"title": "查询容器实例sshdlog的事件列表"
|
57
|
-
}
|
58
|
-
],
|
59
|
-
"DescribeContainerInstances": [
|
60
|
-
{
|
61
|
-
"document": "",
|
62
|
-
"input": "https://cis.tencentcloudapi.com/?Action=DescribeContainerInstances\r\n&Offset=0&Limit=10\r\n&Filters.0.Name=InstanceName\r\n&Filters.0.ValueList.0=hello\r\n&<公共请求参数>",
|
63
|
-
"output": "{\r\n \"Response\": {\r\n \"ContainerInstanceList\": [\r\n {\r\n \"InstanceId\": \"cis-h2ud12sa\",\r\n \"InstanceName\": \"helloworld\",\r\n \"Zone\": \"ap-guangzhou-4\",\r\n \"VpcId\": \"vpc-3p4hvnmx\",\r\n \"VpcName\": \"ddtest\",\r\n \"VpcCidr\": \"10.0.0.0/16\",\r\n \"SubnetId\": \"subnet-r0t1xm4e\",\r\n \"SubnetName\": \"zone4\",\r\n \"SubnetCidr\": \"10.0.2.0/24\",\r\n \"CreateTime\": \"2018-05-17 11:14:28\",\r\n \"RestartPolicy\": \"Never\",\r\n \"State\": \"Succeeded\",\r\n \"StartTime\": \"2018-05-17 11:16:23\",\r\n \"LanIp\": \"10.0.2.11\",\r\n \"Containers\": [\r\n {\r\n \"Command\": \"echo\",\r\n \"Args\": [\r\n \"hello world\"\r\n ],\r\n \"EnvironmentVars\": null,\r\n \"Image\": \"alpine:latest\",\r\n \"Name\": \"helloworld\",\r\n \"WorkingDir\": null,\r\n \"Cpu\": 0.25,\r\n \"Memory\": 0.25,\r\n \"ContainerId\": \"7aa85b70a3e1e1856718cbb7f1de0dba236272380da2854f059dd489d4d967cd\",\r\n \"RestartCount\": 0,\r\n \"CurrentState\": {\r\n \"Reason\": \"Completed\",\r\n \"StartTime\": \"2018-05-17 11:16:42\",\r\n \"FinishTime\": \"2018-05-17 11:16:42\",\r\n \"ExitCode\": 0,\r\n \"State\": \"Terminated\"\r\n },\r\n \"PreviousState\": null\r\n }\r\n ]\r\n },\r\n {\r\n \"InstanceId\": \"cis-esmfjhek\",\r\n \"InstanceName\": \"helloworld2\",\r\n \"Zone\": \"ap-guangzhou-4\",\r\n \"VpcId\": \"vpc-3p4hvnmx\",\r\n \"VpcName\": \"ddtest\",\r\n \"VpcCidr\": \"10.0.0.0/16\",\r\n \"SubnetId\": \"subnet-r0t1xm4e\",\r\n \"SubnetName\": \"zone4\",\r\n \"SubnetCidr\": \"10.0.2.0/24\",\r\n \"CreateTime\": \"2018-05-18 14:40:57\",\r\n \"RestartPolicy\": \"Never\",\r\n \"State\": \"Succeeded\",\r\n \"StartTime\": \"2018-05-18 14:40:57\",\r\n \"LanIp\": \"10.0.2.24\",\r\n \"Containers\": [\r\n {\r\n \"Command\": \"echo\",\r\n \"Args\": [\r\n \"hello world\"\r\n ],\r\n \"EnvironmentVars\": null,\r\n \"Image\": \"busybox:latest\",\r\n \"Name\": \"echo\",\r\n \"WorkingDir\": null,\r\n \"Cpu\": 0.25,\r\n \"Memory\": 0.25,\r\n \"ContainerId\": \"11e66fc00ed8c653e256ede6885a8b428731387443331eeef7f12d7f77ceaf39\",\r\n \"RestartCount\": 0,\r\n \"CurrentState\": {\r\n \"Reason\": \"Completed\",\r\n \"StartTime\": \"2018-05-18 14:41:11\",\r\n \"FinishTime\": \"2018-05-18 14:41:11\",\r\n \"ExitCode\": 0,\r\n \"State\": \"Terminated\"\r\n },\r\n \"PreviousState\": null\r\n }\r\n ]\r\n }\r\n ],\r\n \"TotalCount\": 2,\r\n \"RequestId\": \"7695ee56-77d2-43b1-bc7d-d85f411d44c6\"\r\n }\r\n}",
|
64
|
-
"title": "查询容器实例列表"
|
65
|
-
}
|
66
|
-
],
|
67
|
-
"DescribeContainerLog": [
|
68
|
-
{
|
69
|
-
"document": "",
|
70
|
-
"input": "https://cis.tencentcloudapi.com/?Action=DescribeContainerLog\r\n&InstanceName=sshdlog\r\n&<公共请求参数>",
|
71
|
-
"output": "{\r\n \"Response\": {\r\n \"ContainerLogList\": [\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:04\",\r\n \"Log\": \"2018-05-18 06:34:04,123 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:04\",\r\n \"Log\": \"2018-05-18 06:34:04,123 WARN No file matches via include \\\"/etc/supervisord.d/*.ini\\\"\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:04\",\r\n \"Log\": \"2018-05-18 06:34:04,123 INFO Included extra file \\\"/etc/supervisord.d/sshd-bootstrap.conf\\\" during parsing\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:04\",\r\n \"Log\": \"2018-05-18 06:34:04,123 INFO Included extra file \\\"/etc/supervisord.d/sshd-wrapper.conf\\\" during parsing\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:04\",\r\n \"Log\": \"2018-05-18 06:34:04,126 INFO supervisord started with pid 1\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:05\",\r\n \"Log\": \"2018-05-18 06:34:05,129 INFO spawned: 'supervisor_stdout' with pid 7\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:05\",\r\n \"Log\": \"2018-05-18 06:34:05,131 INFO spawned: 'sshd-bootstrap' with pid 8\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:05\",\r\n \"Log\": \"2018-05-18 06:34:05,205 INFO spawned: 'sshd-wrapper' with pid 9\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:05\",\r\n \"Log\": \"2018-05-18 06:34:05,605 INFO success: supervisor_stdout entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:05\",\r\n \"Log\": \"2018-05-18 06:34:05,605 INFO success: sshd-bootstrap entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:05\",\r\n \"Log\": \"2018-05-18 06:34:05,605 INFO success: sshd-wrapper entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"sshd-bootstrap stdout | Initialising SSH.\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"sshd-bootstrap stdout | \"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"================================================================================\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"SSH Details\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"--------------------------------------------------------------------------------\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"user : app-admin\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"password : n1KI5zLucvzr8hqY\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"id : 500:500\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"home : /home/app-admin\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"chroot path : N/A\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"shell : /bin/bash\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"sudo : ALL=(ALL) ALL\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"key fingerprints :\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"dd:3b:b8:2e:85:04:06:e9:ab:ff:a8:0a:c0:04:6e:d6 (insecure key)\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"rsa host key fingerprint :\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"37:aa:b8:20:2f:b1:05:59:5d:af:aa:1b:28:d6:fc:ad\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"--------------------------------------------------------------------------------\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"3.21979\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"\"\r\n },\r\n {\r\n \"Name\": \"sshd\",\r\n \"Time\": \"2018-05-18 14:34:08\",\r\n \"Log\": \"2018-05-18 06:34:08,617 INFO exited: sshd-bootstrap (exit status 0; expected)\"\r\n }\r\n ],\r\n \"RequestId\": \"44156dc9-c6b5-4f58-b11f-7aeec0beac76\"\r\n }\r\n}",
|
72
|
-
"title": "获取sshdlog容器实例日志信息"
|
73
|
-
}
|
74
|
-
],
|
75
|
-
"InquiryPriceCreateCis": [
|
76
|
-
{
|
77
|
-
"document": "",
|
78
|
-
"input": "https://cis.tencentcloudapi.com/?Action=InquiryPriceCreateCis\r\n&Zone=ap-chengdu-1\r\n&Cpu=1.0\r\n&Memory=1.0\r\n&<公共请求参数>",
|
79
|
-
"output": "{\r\n \"Response\": {\r\n \"Price\": {\r\n \"DiscountPrice\": 0.3,\r\n \"OriginalPrice\": 0.3\r\n },\r\n \"RequestId\": \"12345\"\r\n }\r\n}",
|
80
|
-
"title": "查询成都一区1核1Gi容器实例价格"
|
81
|
-
}
|
82
|
-
],
|
83
|
-
"ListContainerInstance": [
|
84
|
-
{
|
85
|
-
"document": "",
|
86
|
-
"input": "https://cis.tencentcloudapi.com/?Action=ListContainerInstance\r\n&<公共请求参数>",
|
87
|
-
"output": "{\r\n \"Response\": {\r\n \"ContainerInstanceList\": [\r\n {\r\n \"InstanceId\": \"cis-ql2xh3x9\",\r\n \"InstanceName\": \"cis-dev233\",\r\n \"VpcId\": \"vpc-mjmab5g2\",\r\n \"SubnetId\": \"subnet-bwyqjag9\",\r\n \"CreateTime\": \"2018-04-18 19:31:07\",\r\n \"RestartPolicy\": \"Never\",\r\n \"State\": \"Running\",\r\n \"StartTime\": \"2018-04-18 19:33:25\",\r\n \"Containers\": [\r\n {\r\n \"Command\": null,\r\n \"Args\": null,\r\n \"EnvironmentVars\": null,\r\n \"Image\": \"jdeathe/centos-ssh:centos-7\",\r\n \"Name\": \"sshd\",\r\n \"Cpu\": 1.0,\r\n \"Memory\": 1,\r\n \"RestartCount\": 0,\r\n \"CurrentState\": {\r\n \"StartTime\": \"2018-04-18 19:33:41\",\r\n \"State\": \"Running\"\r\n },\r\n \"PreviousState\": null\r\n }\r\n ]\r\n },\r\n {\r\n \"InstanceId\": \"cis-mfntr8n3\",\r\n \"InstanceName\": \"cis-dev6\",\r\n \"VpcId\": \"vpc-mjmab5g2\",\r\n \"SubnetId\": \"subnet-bwyqjag9\",\r\n \"CreateTime\": \"2018-04-19 13:34:37\",\r\n \"RestartPolicy\": \"Never\",\r\n \"State\": \"Succeeded\",\r\n \"StartTime\": \"2018-04-19 13:34:36\",\r\n \"Containers\": [\r\n {\r\n \"Command\": [\r\n \"/bin/sh\",\r\n \"-c\",\r\n \"echo helloworld\"\r\n ],\r\n \"Args\": [\r\n \"hi\"\r\n ],\r\n \"EnvironmentVars\": [\r\n {\r\n \"Name\": \"TEST\",\r\n \"Value\": \"cis\"\r\n }\r\n ],\r\n \"Image\": \"alpine:latest\",\r\n \"Name\": \"helloworld\",\r\n \"Cpu\": 1.0,\r\n \"Memory\": 1,\r\n \"RestartCount\": 0,\r\n \"CurrentState\": {\r\n \"Reason\": \"Completed\",\r\n \"StartTime\": \"2018-04-19 13:34:40\",\r\n \"FinishTime\": \"2018-04-19 13:34:40\",\r\n \"ExitCode\": 0\r\n },\r\n \"PreviousState\": null\r\n }\r\n ]\r\n },\r\n {\r\n \"InstanceId\": \"cis-qlbsyopp\",\r\n \"InstanceName\": \"cis-dev7\",\r\n \"VpcId\": \"vpc-mjmab5g2\",\r\n \"SubnetId\": \"subnet-bwyqjag9\",\r\n \"CreateTime\": \"2018-04-19 21:33:35\",\r\n \"RestartPolicy\": \"Never\",\r\n \"State\": \"Succeeded\",\r\n \"StartTime\": \"2018-04-19 21:33:35\",\r\n \"Containers\": [\r\n {\r\n \"Command\": [\r\n \"/bin/sh\",\r\n \"-c\",\r\n \"echo helloworld\"\r\n ],\r\n \"Args\": [\r\n \"hi\"\r\n ],\r\n \"EnvironmentVars\": [\r\n {\r\n \"Name\": \"TEST\",\r\n \"Value\": \"cis\"\r\n }\r\n ],\r\n \"Image\": \"alpine:latest\",\r\n \"Name\": \"helloworld\",\r\n \"Cpu\": 1.0,\r\n \"Memory\": 1,\r\n \"RestartCount\": 0,\r\n \"CurrentState\": {\r\n \"Reason\": \"Completed\",\r\n \"StartTime\": \"2018-04-19 21:33:41\",\r\n \"FinishTime\": \"2018-04-19 21:33:41\",\r\n \"ExitCode\": 0\r\n },\r\n \"PreviousState\": null\r\n }\r\n ]\r\n },\r\n {\r\n \"InstanceId\": \"cis-pnc0esgv\",\r\n \"InstanceName\": \"cis-dev2\",\r\n \"VpcId\": \"vpc-mjmab5g2\",\r\n \"SubnetId\": \"subnet-bwyqjag9\",\r\n \"CreateTime\": \"2018-04-20 17:07:36\",\r\n \"RestartPolicy\": \"Never\",\r\n \"State\": \"Running\",\r\n \"StartTime\": \"2018-04-20 17:07:35\",\r\n \"Containers\": [\r\n {\r\n \"Command\": null,\r\n \"Args\": null,\r\n \"EnvironmentVars\": null,\r\n \"Image\": \"jdeathe/centos-ssh:centos-7\",\r\n \"Name\": \"sshd\",\r\n \"Cpu\": 1.0,\r\n \"Memory\": 1,\r\n \"RestartCount\": 0,\r\n \"CurrentState\": {\r\n \"StartTime\": \"2018-04-20 17:07:36\",\r\n \"State\": \"Running\"\r\n },\r\n \"PreviousState\": null\r\n }\r\n ]\r\n }\r\n ],\r\n \"RequestId\": \"12345\"\r\n }\r\n}",
|
88
|
-
"title": "查询容器实例列表"
|
89
|
-
}
|
90
|
-
]
|
91
|
-
},
|
92
|
-
"version": "1.0"
|
93
|
-
}
|
@@ -1,207 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
import os
|
3
|
-
import sys
|
4
|
-
import six
|
5
|
-
import json
|
6
|
-
import tccli.options_define as OptionsDefine
|
7
|
-
import tccli.format_output as FormatOutput
|
8
|
-
from tccli import __version__
|
9
|
-
from tccli.utils import Utils
|
10
|
-
from tccli.exceptions import ConfigurationError, ClientError, ParamError
|
11
|
-
from tencentcloud.common import credential
|
12
|
-
from tencentcloud.common.profile.http_profile import HttpProfile
|
13
|
-
from tencentcloud.common.profile.client_profile import ClientProfile
|
14
|
-
from tencentcloud.dataintegration.v20220613 import dataintegration_client as dataintegration_client_v20220613
|
15
|
-
from tencentcloud.dataintegration.v20220613 import models as models_v20220613
|
16
|
-
|
17
|
-
from jmespath import search
|
18
|
-
import time
|
19
|
-
|
20
|
-
def doSendMessage(args, parsed_globals):
|
21
|
-
g_param = parse_global_arg(parsed_globals)
|
22
|
-
|
23
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
24
|
-
cred = credential.CVMRoleCredential()
|
25
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
26
|
-
cred = credential.STSAssumeRoleCredential(
|
27
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
28
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
29
|
-
)
|
30
|
-
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):
|
31
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
32
|
-
else:
|
33
|
-
cred = credential.Credential(
|
34
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
35
|
-
)
|
36
|
-
http_profile = HttpProfile(
|
37
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
38
|
-
reqMethod="POST",
|
39
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
40
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
41
|
-
)
|
42
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
43
|
-
if g_param[OptionsDefine.Language]:
|
44
|
-
profile.language = g_param[OptionsDefine.Language]
|
45
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
46
|
-
client = mod.DataintegrationClient(cred, g_param[OptionsDefine.Region], profile)
|
47
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
48
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
-
model = models.SendMessageRequest()
|
50
|
-
model.from_json_string(json.dumps(args))
|
51
|
-
start_time = time.time()
|
52
|
-
while True:
|
53
|
-
rsp = client.SendMessage(model)
|
54
|
-
result = rsp.to_json_string()
|
55
|
-
try:
|
56
|
-
json_obj = json.loads(result)
|
57
|
-
except TypeError as e:
|
58
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
59
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
60
|
-
break
|
61
|
-
cur_time = time.time()
|
62
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
63
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
64
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
65
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
66
|
-
else:
|
67
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
68
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
69
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
|
-
|
71
|
-
|
72
|
-
CLIENT_MAP = {
|
73
|
-
"v20220613": dataintegration_client_v20220613,
|
74
|
-
|
75
|
-
}
|
76
|
-
|
77
|
-
MODELS_MAP = {
|
78
|
-
"v20220613": models_v20220613,
|
79
|
-
|
80
|
-
}
|
81
|
-
|
82
|
-
ACTION_MAP = {
|
83
|
-
"SendMessage": doSendMessage,
|
84
|
-
|
85
|
-
}
|
86
|
-
|
87
|
-
AVAILABLE_VERSION_LIST = [
|
88
|
-
"v20220613",
|
89
|
-
|
90
|
-
]
|
91
|
-
|
92
|
-
|
93
|
-
def action_caller():
|
94
|
-
return ACTION_MAP
|
95
|
-
|
96
|
-
|
97
|
-
def parse_global_arg(parsed_globals):
|
98
|
-
g_param = parsed_globals
|
99
|
-
cvm_role_flag = True
|
100
|
-
for param in parsed_globals.keys():
|
101
|
-
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
102
|
-
OptionsDefine.RoleSessionName]:
|
103
|
-
if parsed_globals[param] is not None:
|
104
|
-
cvm_role_flag = False
|
105
|
-
break
|
106
|
-
is_exist_profile = True
|
107
|
-
if not parsed_globals["profile"]:
|
108
|
-
is_exist_profile = False
|
109
|
-
g_param["profile"] = os.environ.get("TCCLI_PROFILE", "default")
|
110
|
-
|
111
|
-
configure_path = os.path.join(os.path.expanduser("~"), ".tccli")
|
112
|
-
is_conf_exist, conf_path = Utils.file_existed(configure_path, g_param["profile"] + ".configure")
|
113
|
-
is_cred_exist, cred_path = Utils.file_existed(configure_path, g_param["profile"] + ".credential")
|
114
|
-
|
115
|
-
conf = {}
|
116
|
-
cred = {}
|
117
|
-
|
118
|
-
if is_conf_exist:
|
119
|
-
conf = Utils.load_json_msg(conf_path)
|
120
|
-
if is_cred_exist:
|
121
|
-
cred = Utils.load_json_msg(cred_path)
|
122
|
-
|
123
|
-
if not (isinstance(conf, dict) and isinstance(cred, dict)):
|
124
|
-
raise ConfigurationError(
|
125
|
-
"file: %s or %s is not json format"
|
126
|
-
% (g_param["profile"] + ".configure", g_param["profile"] + ".credential"))
|
127
|
-
|
128
|
-
if OptionsDefine.Token not in cred:
|
129
|
-
cred[OptionsDefine.Token] = None
|
130
|
-
|
131
|
-
if not is_exist_profile:
|
132
|
-
if os.environ.get(OptionsDefine.ENV_SECRET_ID) and os.environ.get(OptionsDefine.ENV_SECRET_KEY):
|
133
|
-
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
134
|
-
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
135
|
-
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
136
|
-
cvm_role_flag = False
|
137
|
-
|
138
|
-
if os.environ.get(OptionsDefine.ENV_REGION):
|
139
|
-
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
140
|
-
|
141
|
-
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
142
|
-
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
143
|
-
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
144
|
-
cvm_role_flag = False
|
145
|
-
|
146
|
-
if cvm_role_flag:
|
147
|
-
if "type" in cred and cred["type"] == "cvm-role":
|
148
|
-
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
149
|
-
|
150
|
-
for param in g_param.keys():
|
151
|
-
if g_param[param] is None:
|
152
|
-
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.Token]:
|
153
|
-
if param in cred:
|
154
|
-
g_param[param] = cred[param]
|
155
|
-
elif not (g_param[OptionsDefine.UseCVMRole.replace('-', '_')]
|
156
|
-
or os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN)):
|
157
|
-
raise ConfigurationError("%s is invalid" % param)
|
158
|
-
elif param in [OptionsDefine.Region, OptionsDefine.Output, OptionsDefine.Language]:
|
159
|
-
if param in conf[OptionsDefine.SysParam]:
|
160
|
-
g_param[param] = conf[OptionsDefine.SysParam][param]
|
161
|
-
elif param != OptionsDefine.Language:
|
162
|
-
raise ConfigurationError("%s is invalid" % param)
|
163
|
-
elif param.replace('_', '-') in [OptionsDefine.RoleArn, OptionsDefine.RoleSessionName]:
|
164
|
-
if param.replace('_', '-') in cred:
|
165
|
-
g_param[param] = cred[param.replace('_', '-')]
|
166
|
-
|
167
|
-
try:
|
168
|
-
if g_param[OptionsDefine.ServiceVersion]:
|
169
|
-
g_param[OptionsDefine.Version] = "v" + g_param[OptionsDefine.ServiceVersion].replace('-', '')
|
170
|
-
else:
|
171
|
-
version = conf["dataintegration"][OptionsDefine.Version]
|
172
|
-
g_param[OptionsDefine.Version] = "v" + version.replace('-', '')
|
173
|
-
|
174
|
-
if g_param[OptionsDefine.Endpoint] is None:
|
175
|
-
g_param[OptionsDefine.Endpoint] = conf["dataintegration"][OptionsDefine.Endpoint]
|
176
|
-
g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
|
177
|
-
except Exception as err:
|
178
|
-
raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
|
179
|
-
|
180
|
-
if g_param[OptionsDefine.Version] not in AVAILABLE_VERSION_LIST:
|
181
|
-
raise Exception("available versions: %s" % " ".join(AVAILABLE_VERSION_LIST))
|
182
|
-
|
183
|
-
if g_param[OptionsDefine.Waiter]:
|
184
|
-
param = eval(g_param[OptionsDefine.Waiter])
|
185
|
-
if 'expr' not in param:
|
186
|
-
raise Exception('`expr` in `--waiter` must be defined')
|
187
|
-
if 'to' not in param:
|
188
|
-
raise Exception('`to` in `--waiter` must be defined')
|
189
|
-
if 'timeout' not in param:
|
190
|
-
if 'waiter' in conf and 'timeout' in conf['waiter']:
|
191
|
-
param['timeout'] = conf['waiter']['timeout']
|
192
|
-
else:
|
193
|
-
param['timeout'] = 180
|
194
|
-
if 'interval' not in param:
|
195
|
-
if 'waiter' in conf and 'interval' in conf['waiter']:
|
196
|
-
param['interval'] = conf['waiter']['interval']
|
197
|
-
else:
|
198
|
-
param['interval'] = 5
|
199
|
-
param['interval'] = min(param['interval'], param['timeout'])
|
200
|
-
g_param['OptionsDefine.WaiterInfo'] = param
|
201
|
-
|
202
|
-
if six.PY2:
|
203
|
-
for key, value in g_param.items():
|
204
|
-
if isinstance(value, six.text_type):
|
205
|
-
g_param[key] = value.encode('utf-8')
|
206
|
-
return g_param
|
207
|
-
|
@@ -1,87 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"actions": {
|
3
|
-
"SendMessage": {
|
4
|
-
"document": "使用SDK将数据上报到DIP",
|
5
|
-
"input": "SendMessageRequest",
|
6
|
-
"name": "数据上报",
|
7
|
-
"output": "SendMessageResponse",
|
8
|
-
"status": "online"
|
9
|
-
}
|
10
|
-
},
|
11
|
-
"metadata": {
|
12
|
-
"apiVersion": "2022-06-13",
|
13
|
-
"api_brief": "文档包含数据上报、数据任务的创建、暂停、重启等。",
|
14
|
-
"serviceNameCN": "数据接入平台",
|
15
|
-
"serviceShortName": "dataintegration"
|
16
|
-
},
|
17
|
-
"objects": {
|
18
|
-
"BatchContent": {
|
19
|
-
"document": "批量消息",
|
20
|
-
"members": [
|
21
|
-
{
|
22
|
-
"document": "消息体",
|
23
|
-
"example": "MessageIdContent",
|
24
|
-
"member": "string",
|
25
|
-
"name": "Body",
|
26
|
-
"required": true,
|
27
|
-
"type": "string",
|
28
|
-
"value_allowed_null": false
|
29
|
-
},
|
30
|
-
{
|
31
|
-
"document": "消息的键名",
|
32
|
-
"example": "Message-key-439j9hj92",
|
33
|
-
"member": "string",
|
34
|
-
"name": "Key",
|
35
|
-
"required": false,
|
36
|
-
"type": "string",
|
37
|
-
"value_allowed_null": false
|
38
|
-
}
|
39
|
-
],
|
40
|
-
"usage": "in"
|
41
|
-
},
|
42
|
-
"SendMessageRequest": {
|
43
|
-
"document": "SendMessage请求参数结构体",
|
44
|
-
"members": [
|
45
|
-
{
|
46
|
-
"document": "接入资源ID",
|
47
|
-
"example": "datahub-rinibi1",
|
48
|
-
"member": "string",
|
49
|
-
"name": "DataHubId",
|
50
|
-
"required": true,
|
51
|
-
"type": "string"
|
52
|
-
},
|
53
|
-
{
|
54
|
-
"document": "批量消息",
|
55
|
-
"example": "无",
|
56
|
-
"member": "BatchContent",
|
57
|
-
"name": "Message",
|
58
|
-
"required": true,
|
59
|
-
"type": "list"
|
60
|
-
}
|
61
|
-
],
|
62
|
-
"type": "object"
|
63
|
-
},
|
64
|
-
"SendMessageResponse": {
|
65
|
-
"document": "SendMessage返回参数结构体",
|
66
|
-
"members": [
|
67
|
-
{
|
68
|
-
"document": "消息ID",
|
69
|
-
"example": "无",
|
70
|
-
"member": "string",
|
71
|
-
"name": "MessageId",
|
72
|
-
"required": true,
|
73
|
-
"type": "list",
|
74
|
-
"value_allowed_null": false
|
75
|
-
},
|
76
|
-
{
|
77
|
-
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
78
|
-
"member": "string",
|
79
|
-
"name": "RequestId",
|
80
|
-
"type": "string"
|
81
|
-
}
|
82
|
-
],
|
83
|
-
"type": "object"
|
84
|
-
}
|
85
|
-
},
|
86
|
-
"version": "1.0"
|
87
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"actions": {
|
3
|
-
"SendMessage": [
|
4
|
-
{
|
5
|
-
"document": "",
|
6
|
-
"input": "POST / HTTP/1.1\nHost: dataintegration.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SendMessage\n<公共请求参数>\n\n{\n \"Message\": [\n {\n \"Body\": \"xx\",\n \"Key\": \"xx\"\n },\n {\n \"Body\": \"xx\",\n \"Key\": \"xx\"\n }\n ],\n \"DataHubId\": \"xx\"\n}",
|
7
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"20e995ed-75b9-43bb-84c0-35676567e1a8\",\n \"MessageId\": [\n \"646174616875622d6d657568396e686e3a6465736372696265436c6f75644170693a343a3236313838\",\n \"875622d6d657568396e686e3a6465736372696265436c6f75644170693a343a3236323337\"\n ]\n }\n}",
|
8
|
-
"title": "数据上报"
|
9
|
-
}
|
10
|
-
]
|
11
|
-
},
|
12
|
-
"version": "1.0"
|
13
|
-
}
|
tccli/services/dtf/__init__.py
DELETED