tccli 3.0.1155.1__py2.py3-none-any.whl → 3.0.1157.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 (48) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/autoscaling/v20180419/api.json +48 -20
  3. tccli/services/cam/v20190116/api.json +10 -0
  4. tccli/services/ccc/v20200210/api.json +10 -0
  5. tccli/services/ccc/v20200210/examples.json +1 -1
  6. tccli/services/cdb/v20170320/api.json +38 -1
  7. tccli/services/cdwch/v20200915/api.json +27 -0
  8. tccli/services/cdwdoris/v20211228/api.json +27 -0
  9. tccli/services/cynosdb/v20190107/api.json +1 -1
  10. tccli/services/dts/v20211206/api.json +9 -0
  11. tccli/services/ess/ess_client.py +53 -0
  12. tccli/services/ess/v20201111/api.json +91 -0
  13. tccli/services/ess/v20201111/examples.json +8 -0
  14. tccli/services/gaap/v20180529/api.json +17 -17
  15. tccli/services/gaap/v20180529/examples.json +7 -13
  16. tccli/services/hunyuan/v20230901/api.json +2 -2
  17. tccli/services/iss/v20230517/api.json +6 -6
  18. tccli/services/mongodb/mongodb_client.py +273 -8
  19. tccli/services/mongodb/v20190725/api.json +486 -6
  20. tccli/services/mongodb/v20190725/examples.json +40 -0
  21. tccli/services/monitor/v20180724/api.json +23 -23
  22. tccli/services/monitor/v20180724/examples.json +12 -12
  23. tccli/services/mps/v20190612/api.json +2 -2
  24. tccli/services/mps/v20190612/examples.json +2 -2
  25. tccli/services/oceanus/v20190422/api.json +9 -0
  26. tccli/services/postgres/postgres_client.py +395 -24
  27. tccli/services/postgres/v20170312/api.json +549 -0
  28. tccli/services/postgres/v20170312/examples.json +92 -0
  29. tccli/services/rce/v20201103/api.json +78 -0
  30. tccli/services/tcr/v20190924/api.json +71 -45
  31. tccli/services/tcr/v20190924/examples.json +9 -9
  32. tccli/services/tem/v20210701/api.json +21 -3
  33. tccli/services/tem/v20210701/examples.json +1 -7
  34. tccli/services/thpc/thpc_client.py +110 -4
  35. tccli/services/thpc/v20230321/api.json +170 -35
  36. tccli/services/thpc/v20230321/examples.json +17 -1
  37. tccli/services/tke/v20220501/api.json +10 -0
  38. tccli/services/vclm/v20240523/api.json +9 -0
  39. tccli/services/vpc/v20170312/api.json +74 -15
  40. tccli/services/waf/v20180125/api.json +421 -72
  41. tccli/services/waf/v20180125/examples.json +6 -6
  42. tccli/services/wedata/v20210820/api.json +45 -7
  43. tccli/services/wedata/v20210820/examples.json +6 -0
  44. {tccli-3.0.1155.1.dist-info → tccli-3.0.1157.1.dist-info}/METADATA +2 -2
  45. {tccli-3.0.1155.1.dist-info → tccli-3.0.1157.1.dist-info}/RECORD +48 -48
  46. {tccli-3.0.1155.1.dist-info → tccli-3.0.1157.1.dist-info}/WHEEL +0 -0
  47. {tccli-3.0.1155.1.dist-info → tccli-3.0.1157.1.dist-info}/entry_points.txt +0 -0
  48. {tccli-3.0.1155.1.dist-info → tccli-3.0.1157.1.dist-info}/license_files/LICENSE +0 -0
@@ -470,9 +470,9 @@
470
470
  ],
471
471
  "DescribeImageManifests": [
472
472
  {
473
- "document": "",
474
- "input": "https://tcr.tencentcloudapi.com/?Action=DescribeImageManifests\r\n&<公共请求参数>\r\n&RegistryId=tcr-7s2d14fn\r\n&NamespaceName=test\r\n&RepositoryName=mytest\r\n&ImageVersion=1.0",
475
- "output": "{\n \"Response\": {\n \"RequestId\": \"6ef83620-c92e-496c-b206-25b0b638f409\",\n \"Manifest\": \"{\\\"config\\\":{\\\"digest\\\":\\\"sha256:72f6114b119f1423a2713aca1e15cb9aeadf835a714d36f7a2cf88d10e4bb6be\\\",\\\"mediaType\\\":\\\"application/vnd.docker.container.image.v1+json\\\",\\\"size\\\":2396},\\\"layers\\\":[{\\\"digest\\\":\\\"sha256:9123ac7c32f74759e6283f04dbf571f18246abe5bb2c779efcb32cd50f3ff13c\\\",\\\"mediaType\\\":\\\"application/vnd.docker.image.rootfs.diff.tar.gzip\\\",\\\"size\\\":2764173},{\\\"digest\\\":\\\"sha256:8673ef3ff8fc5ede7363cbe74d295b013ef7959ba002af607314d8ee77b58a5a\\\",\\\"mediaType\\\":\\\"application/vnd.docker.image.rootfs.diff.tar.gzip\\\",\\\"size\\\":1616975},{\\\"digest\\\":\\\"sha256:a8e22d4a83517ee59537183a2f7ca35fa7b81d36176a9d5d42ca2ab0486af779\\\",\\\"mediaType\\\":\\\"application/vnd.docker.image.rootfs.diff.tar.gzip\\\",\\\"size\\\":8446306}],\\\"mediaType\\\":\\\"application/vnd.docker.distribution.manifest.v2+json\\\",\\\"schemaVersion\\\":2}\",\n \"Config\": \"\"\n }\n}",
473
+ "document": "查询容器镜像Manifest、Config和Labels信息",
474
+ "input": "POST / HTTP/1.1\nHost: tcr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeImageManifests\n<公共请求参数>\n\n{\n \"RegistryId\": \"tcr-7s2d14fn\",\n \"NamespaceName\": \"test\",\n \"RepositoryName\": \"mytest\",\n \"ImageVersion\": \"1.0\"\n}",
475
+ "output": "{\n \"Response\": {\n \"Manifest\": \"{\\\"config\\\":{\\\"digest\\\":\\\"sha256:72f6114b119f1423a2713aca1e15cb9aeadf835a714d36f7a2cf88d10e4bb6be\\\",\\\"mediaType\\\":\\\"application/vnd.docker.container.image.v1+json\\\",\\\"size\\\":2396},\\\"layers\\\":[{\\\"digest\\\":\\\"sha256:9123ac7c32f74759e6283f04dbf571f18246abe5bb2c779efcb32cd50f3ff13c\\\",\\\"mediaType\\\":\\\"application/vnd.docker.image.rootfs.diff.tar.gzip\\\",\\\"size\\\":2764173},{\\\"digest\\\":\\\"sha256:8673ef3ff8fc5ede7363cbe74d295b013ef7959ba002af607314d8ee77b58a5a\\\",\\\"mediaType\\\":\\\"application/vnd.docker.image.rootfs.diff.tar.gzip\\\",\\\"size\\\":1616975},{\\\"digest\\\":\\\"sha256:a8e22d4a83517ee59537183a2f7ca35fa7b81d36176a9d5d42ca2ab0486af779\\\",\\\"mediaType\\\":\\\"application/vnd.docker.image.rootfs.diff.tar.gzip\\\",\\\"size\\\":8446306}],\\\"mediaType\\\":\\\"application/vnd.docker.distribution.manifest.v2+json\\\",\\\"schemaVersion\\\":2}\",\n \"Config\": \"abc\",\n \"Labels\": [\n {\n \"Key\": \"abc\",\n \"Value\": \"abc\"\n }\n ],\n \"RequestId\": \"6ef83620-c92e-496c-b206-25b0b638f409\"\n }\n}",
476
476
  "title": "查询容器镜像Manifest信息"
477
477
  }
478
478
  ],
@@ -664,7 +664,7 @@
664
664
  {
665
665
  "document": "",
666
666
  "input": "https://tcr.tencentcloudapi.com/?Action=DescribeTagRetentionExecutionTask\n&RegistryId=tcr-12345\n&RetentionId=1\n&ExecutionId=1\n&Limit=20\n&Offset=1\n&<公共请求参数>",
667
- "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"RetentionTaskList\": [\n {\n \"Status\": \"xx\",\n \"Total\": 0,\n \"Retained\": 0,\n \"TaskId\": 0,\n \"Repository\": \"xx\",\n \"ExecutionId\": 0,\n \"StartTime\": \"xx\",\n \"EndTime\": \"xx\"\n }\n ],\n \"RequestId\": \"xx\"\n }\n}",
667
+ "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"RetentionTaskList\": [\n {\n \"Status\": \"success\",\n \"Total\": 0,\n \"Retained\": 0,\n \"TaskId\": 0,\n \"Repository\": \"repo\",\n \"ExecutionId\": 0,\n \"StartTime\": \"2024-06-01\",\n \"EndTime\": \"2024-06-01\"\n }\n ],\n \"RequestId\": \"1234-666\"\n }\n}",
668
668
  "title": "查询版本保留执行任务"
669
669
  }
670
670
  ],
@@ -672,8 +672,8 @@
672
672
  {
673
673
  "document": "",
674
674
  "input": "https://tcr.tencentcloudapi.com/?Action=DescribeTagRetentionRules\n&RegistryId=tcr-12345\n&NamespaceName=test\n&Limit=20\n&Offset=1\n&<公共请求参数>",
675
- "output": "{\n \"Response\": {\n \"RequestId\": \"c7abb9f2-9440-43ea-a12f-ae58875acf3d\",\n \"RetentionPolicyList\": [\n {\n \"NextExecutionTime\": \"xx\",\n \"RetentionId\": 1,\n \"NamespaceName\": \"aaaa\",\n \"RetentionRuleList\": [\n {\n \"Key\": \"latestPushedK\",\n \"Value\": 10\n }\n ],\n \"CronSetting\": \"weekly\",\n \"Disabled\": false\n }\n ],\n \"TotalCount\": 0\n }\n}",
676
- "title": "查询版本保留规则"
675
+ "output": "{\n \"Response\": {\n \"RequestId\": \"c7abb9f2-9440-43ea-a12f-ae58875acf3d\",\n \"RetentionPolicyList\": [\n {\n \"NextExecutionTime\": \"2024-06-24\",\n \"RetentionId\": 1,\n \"NamespaceName\": \"aaaa\",\n \"RetentionRuleList\": [\n {\n \"Key\": \"latestPushedK\",\n \"Value\": 10\n }\n ],\n \"CronSetting\": \"weekly\",\n \"Disabled\": false\n }\n ],\n \"TotalCount\": 0\n }\n}",
676
+ "title": "查询镜像版本保留规则"
677
677
  }
678
678
  ],
679
679
  "DescribeUserQuotaPersonal": [
@@ -694,9 +694,9 @@
694
694
  ],
695
695
  "DescribeWebhookTriggerLog": [
696
696
  {
697
- "document": "",
698
- "input": "https://tcr.tencentcloudapi.com/?Action=DescribeWebhookTriggerLog\r\n&<公共请求参数>\r\n&RegistryId=tcr-ak9876\r\n&Namespace=someNs\r\n&Id=9",
699
- "output": "{\n \"Response\": {\n \"RequestId\": \"be17f554-32fd-451c-a1cd-64f9bd164e3f\",\n \"TotalCount\": 3,\n \"Logs\": [\n {\n \"Id\": 2,\n \"TriggerId\": 25,\n \"EventType\": \"pushImage\",\n \"NotifyType\": \"http\",\n \"Status\": \"finished\",\n \"Detail\": \"{\\\"type\\\":\\\"pushImage\\\",\\\"occur_at\\\":1586774843,\\\"event_data\\\":{\\\"resources\\\":[{\\\"digest\\\":\\\"sha256:7ac7819e1523911399b798309025935a9968b277d86d50e5255465d6592c0266\\\",\\\"tag\\\":\\\"v1\\\",\\\"resource_url\\\":\\\"wcctest.tencentcloudcr.com/nginx/nginx:v1\\\"}],\\\"repository\\\":{\\\"date_created\\\":1586777885,\\\"name\\\":\\\"nginx\\\",\\\"namespace\\\":\\\"nginx\\\",\\\"repo_full_name\\\":\\\"nginx/nginx\\\",\\\"repo_type\\\":\\\"public\\\"}},\\\"operator\\\":\\\"3211064422\\\"}\",\n \"CreationTime\": \"2020-04-14T02:47:23.177329+08:00\",\n \"UpdateTime\": \"2020-04-14T02:47:24.244664+08:00\"\n }\n ]\n }\n}",
697
+ "document": "用于查询触发器日志",
698
+ "input": "POST / HTTP/1.1\nHost: tcr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeWebhookTriggerLog\n<公共请求参数>\n\n{\n \"RegistryId\": \"tcr-ab12345\",\n \"Namespace\": \"someNs\",\n \"Id\": 9\n}",
699
+ "output": "{\n \"Response\": {\n \"RequestId\": \"e8cbb3a5-ae7a-41f3-ba79-950d39ea653b\",\n \"TotalCount\": 3,\n \"Logs\": [\n {\n \"Id\": 2,\n \"TriggerId\": 25,\n \"EventType\": \"pushImage\",\n \"NotifyType\": \"http\",\n \"Status\": \"finished\",\n \"Detail\": \"{\\\"type\\\":\\\"pushImage\\\",\\\"occur_at\\\":1586774843,\\\"event_data\\\":{\\\"resources\\\":[{\\\"digest\\\":\\\"sha256:7ac7819e1523911399b798309025935a9968b277d86d50e5255465d6592c0266\\\",\\\"tag\\\":\\\"v1\\\",\\\"resource_url\\\":\\\"wcctest.tencentcloudcr.com/nginx/nginx:v1\\\"}],\\\"repository\\\":{\\\"date_created\\\":1586777885,\\\"name\\\":\\\"nginx\\\",\\\"namespace\\\":\\\"nginx\\\",\\\"repo_full_name\\\":\\\"nginx/nginx\\\",\\\"repo_type\\\":\\\"public\\\"}},\\\"operator\\\":\\\"3211064422\\\"}\",\n \"CreationTime\": \"2020-04-14T02:47:23.177329+08:00\",\n \"UpdateTime\": \"2020-04-14T02:47:24.244664+08:00\"\n }\n ]\n }\n}",
700
700
  "title": "查询触发器日志"
701
701
  }
702
702
  ],
@@ -1874,8 +1874,8 @@
1874
1874
  },
1875
1875
  {
1876
1876
  "disabled": false,
1877
- "document": "包名。使用 JAR 包或者 WAR 包部署的时候必填。",
1878
- "example": "1",
1877
+ "document": "传入内容为 /jar包名字 的形式。也就是在 jar包名字前增加一个/。\n\n如上传的 jar 包名字为 demo-1.0.0.jar,那么这里传入内容为:/demo-1.0.0.jar\n\n注:jar 包需要通过 tem 页面上传过,tem 后端才能拉到该 jar 包。",
1878
+ "example": "/demo-1.0.0.jar",
1879
1879
  "member": "string",
1880
1880
  "name": "PkgName",
1881
1881
  "required": false,
@@ -2141,6 +2141,24 @@
2141
2141
  "name": "RepoType",
2142
2142
  "required": false,
2143
2143
  "type": "int"
2144
+ },
2145
+ {
2146
+ "disabled": false,
2147
+ "document": "启动后执行的脚本,base64 编码",
2148
+ "example": "无",
2149
+ "member": "string",
2150
+ "name": "PostStartEncoded",
2151
+ "required": false,
2152
+ "type": "string"
2153
+ },
2154
+ {
2155
+ "disabled": false,
2156
+ "document": "停止前执行的脚本,base64 编码",
2157
+ "example": "无",
2158
+ "member": "string",
2159
+ "name": "PreStopEncoded",
2160
+ "required": false,
2161
+ "type": "string"
2144
2162
  }
2145
2163
  ],
2146
2164
  "type": "object"
@@ -2154,7 +2172,7 @@
2154
2172
  "example": "1",
2155
2173
  "member": "string",
2156
2174
  "name": "Result",
2157
- "required": true,
2175
+ "output_required": true,
2158
2176
  "type": "string",
2159
2177
  "value_allowed_null": false
2160
2178
  },
@@ -99,15 +99,9 @@
99
99
  "DeployApplication": [
100
100
  {
101
101
  "document": "应用部署",
102
- "input": "POST / HTTP/1.1\nHost: tem.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeployApplication\n<公共请求参数>\n\n{\n \"Service\": {\n \"ApplicationName\": \"xx\",\n \"ExternalIp\": \"xx\",\n \"Name\": \"xx\",\n \"PortMappings\": [\n {\n \"Protocol\": \"xx\",\n \"TargetPort\": 0,\n \"Port\": 0\n }\n ],\n \"Yaml\": \"xx\",\n \"LoadBalanceId\": \"xx\",\n \"VersionName\": \"xx\",\n \"ClusterIp\": [\n \"xx\"\n ],\n \"SubnetId\": \"xx\",\n \"Type\": \"xx\",\n \"Ports\": [\n 0\n ]\n },\n \"JvmOpts\": \"xx\",\n \"StorageConfs\": [\n {\n \"StorageVolName\": \"xx\",\n \"StorageVolIp\": \"xx\",\n \"StorageVolPath\": \"xx\"\n }\n ],\n \"ImgRepo\": \"xx\",\n \"EnvConf\": [\n {\n \"Value\": \"xx\",\n \"Key\": \"xx\"\n }\n ],\n \"ImageCommand\": \"xx\",\n \"Description\": \"xx\",\n \"JdkVersion\": \"xx\",\n \"ApplicationId\": \"xx\",\n \"LogOutputConf\": {\n \"ClsLogTopicId\": \"xx\",\n \"ClsLogsetName\": \"xx\",\n \"ClsLogsetId\": \"xx\",\n \"ClsLogTopicName\": \"xx\",\n \"OutputType\": \"xx\"\n },\n \"UseRegistryDefaultConfig\": true,\n \"CpuSpec\": 0.0,\n \"DeployMode\": \"xx\",\n \"SecurityGroupIds\": [\n \"xx\"\n ],\n \"SourceChannel\": 0,\n \"DeployVersion\": \"xx\",\n \"InitPodNum\": 1,\n \"VersionDesc\": \"xx\",\n \"ImageArgs\": [\n \"xx\"\n ],\n \"MemorySpec\": 0.0,\n \"EnvironmentId\": \"xx\",\n \"LogConfs\": [\n \"xx\"\n ],\n \"PkgName\": \"xx\",\n \"StorageMountConfs\": [\n {\n \"VolumeName\": \"xx\",\n \"MountPath\": \"xx\"\n }\n ],\n \"EsInfo\": {\n \"MinAliveInstances\": 0,\n \"EsStrategy\": 0,\n \"VersionId\": \"xx\",\n \"Threshold\": 1,\n \"MaxAliveInstances\": 2\n },\n \"VersionId\": \"xx\",\n \"SettingConfs\": [\n {\n \"ConfigDataName\": \"xx\",\n \"MountedPath\": \"xx\",\n \"Data\": [\n {\n \"Value\": \"xx\",\n \"Key\": \"xx\"\n }\n ]\n }\n ],\n \"OsFlavour\": \"ALPINE\"\n}",
102
+ "input": "POST / HTTP/1.1\nHost: tem.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeployApplication\n<公共请求参数>\n\n{\n \"ApplicationId\": \"abc\",\n \"ImgRepo\": \"abc\",\n \"VersionDesc\": \"abc\",\n \"JvmOpts\": \"abc\",\n \"InitPodNum\": 1,\n \"EsInfo\": {\n \"MinAliveInstances\": 0,\n \"MaxAliveInstances\": 0,\n \"EsStrategy\": 0,\n \"VersionId\": \"abc\",\n \"Threshold\": 1\n },\n \"EnvConf\": [\n {\n \"Key\": \"abc\",\n \"Value\": \"abc\",\n \"Type\": \"abc\",\n \"Config\": \"abc\",\n \"Secret\": \"abc\"\n }\n ],\n \"LogConfs\": [\n \"abc\"\n ],\n \"StorageConfs\": [\n {\n \"StorageVolName\": \"abc\",\n \"StorageVolPath\": \"abc\",\n \"StorageVolIp\": \"abc\"\n }\n ],\n \"StorageMountConfs\": [\n {\n \"VolumeName\": \"abc\",\n \"MountPath\": \"abc\"\n }\n ],\n \"DeployMode\": \"abc\",\n \"DeployVersion\": \"abc\",\n \"PkgName\": \"abc\",\n \"CpuSpec\": 0,\n \"MemorySpec\": 0,\n \"JdkVersion\": \"abc\",\n \"SecurityGroupIds\": [\n \"abc\"\n ],\n \"LogOutputConf\": {\n \"OutputType\": \"abc\",\n \"ClsLogsetName\": \"abc\",\n \"ClsLogTopicId\": \"abc\",\n \"ClsLogsetId\": \"abc\",\n \"ClsLogTopicName\": \"abc\"\n },\n \"SourceChannel\": 0,\n \"Description\": \"abc\",\n \"EnvironmentId\": \"abc\",\n \"ImageCommand\": \"abc\",\n \"ImageArgs\": [\n \"abc\"\n ],\n \"UseRegistryDefaultConfig\": true,\n \"SettingConfs\": [\n {\n \"ConfigDataName\": \"abc\",\n \"MountedPath\": \"abc\",\n \"Data\": [\n {\n \"Key\": \"abc\",\n \"Value\": \"abc\",\n \"Type\": \"abc\",\n \"Config\": \"abc\",\n \"Secret\": \"abc\"\n }\n ],\n \"SecretDataName\": \"abc\"\n }\n ],\n \"Service\": {\n \"Name\": \"abc\",\n \"Ports\": [\n 0\n ],\n \"Yaml\": \"abc\",\n \"ApplicationName\": \"abc\",\n \"VersionName\": \"abc\",\n \"ClusterIp\": [\n \"abc\"\n ],\n \"ExternalIp\": \"abc\",\n \"Type\": \"abc\",\n \"SubnetId\": \"abc\",\n \"LoadBalanceId\": \"abc\",\n \"PortMappings\": [\n {\n \"Port\": 0,\n \"TargetPort\": 0,\n \"Protocol\": \"abc\",\n \"ServiceName\": \"abc\"\n }\n ],\n \"ServicePortMappingList\": [\n {\n \"Type\": \"abc\",\n \"ServiceName\": \"abc\",\n \"ClusterIp\": \"abc\",\n \"ExternalIp\": \"abc\",\n \"SubnetId\": \"abc\",\n \"VpcId\": \"abc\",\n \"LoadBalanceId\": \"abc\",\n \"Yaml\": \"abc\",\n \"Ports\": [\n 0\n ],\n \"PortMappingItemList\": [\n {\n \"Port\": 0,\n \"TargetPort\": 0,\n \"Protocol\": \"abc\"\n }\n ],\n \"ExternalDomain\": \"abc\"\n }\n ],\n \"FlushAll\": true,\n \"EnableRegistryNextDeploy\": 0,\n \"ApplicationId\": \"abc\",\n \"AllIpDone\": true,\n \"ExternalDomain\": \"abc\"\n },\n \"VersionId\": \"abc\",\n \"PostStart\": \"abc\",\n \"PreStop\": \"abc\",\n \"Liveness\": {\n \"Type\": \"abc\",\n \"Protocol\": \"abc\",\n \"Path\": \"abc\",\n \"Exec\": \"abc\",\n \"Port\": 0,\n \"InitialDelaySeconds\": 0,\n \"TimeoutSeconds\": 0,\n \"PeriodSeconds\": 0\n },\n \"Readiness\": {\n \"Type\": \"abc\",\n \"Protocol\": \"abc\",\n \"Path\": \"abc\",\n \"Exec\": \"abc\",\n \"Port\": 0,\n \"InitialDelaySeconds\": 0,\n \"TimeoutSeconds\": 0,\n \"PeriodSeconds\": 0\n },\n \"DeployStrategyConf\": {\n \"TotalBatchCount\": 0,\n \"BetaBatchNum\": 0,\n \"DeployStrategyType\": 0,\n \"BatchInterval\": 0,\n \"MinAvailable\": 0,\n \"Force\": true\n },\n \"HorizontalAutoscaler\": [\n {\n \"MinReplicas\": 0,\n \"MaxReplicas\": 0,\n \"Metrics\": \"abc\",\n \"Threshold\": 0,\n \"Enabled\": true,\n \"DoubleThreshold\": 0\n }\n ],\n \"CronHorizontalAutoscaler\": [\n {\n \"Name\": \"abc\",\n \"Period\": \"abc\",\n \"Schedules\": [\n {\n \"StartAt\": \"abc\",\n \"TargetReplicas\": 0\n }\n ],\n \"Enabled\": true,\n \"Priority\": 0\n }\n ],\n \"LogEnable\": 0,\n \"ConfEdited\": true,\n \"SpeedUp\": true,\n \"StartupProbe\": {\n \"Type\": \"abc\",\n \"Protocol\": \"abc\",\n \"Path\": \"abc\",\n \"Exec\": \"abc\",\n \"Port\": 0,\n \"InitialDelaySeconds\": 0,\n \"TimeoutSeconds\": 0,\n \"PeriodSeconds\": 0\n },\n \"OsFlavour\": \"abc\",\n \"EnablePrometheusConf\": {\n \"Port\": 0,\n \"Path\": \"abc\"\n },\n \"EnableTracing\": 0,\n \"EnableMetrics\": 0,\n \"TcrInstanceId\": \"abc\",\n \"RepoServer\": \"abc\",\n \"RepoType\": 0,\n \"PostStartEncoded\": \"abc\",\n \"PreStopEncoded\": \"abc\"\n}",
103
103
  "output": "{\n \"Response\": {\n \"RequestId\": \"81f74023-563c-437d-abf7-8139449ef178\",\n \"Result\": \"version-xxx\"\n }\n}",
104
104
  "title": "应用部署"
105
- },
106
- {
107
- "document": "",
108
- "input": "POST / HTTP/1.1\nHost: tem.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeployApplication\n<公共请求参数>\n\n{\n \"Service\": {\n \"Name\": \"字符串\"\n },\n \"JvmOpts\": \"字符串\",\n \"SpeedUp\": \"false\",\n \"PreStop\": \"字符串\",\n \"ImgRepo\": \"字符串\",\n \"EnvConf\": [\n {\n \"Config\": \"字符串\",\n \"Type\": \"字符串\",\n \"Key\": \"字符串\",\n \"Value\": \"字符串\"\n }\n ],\n \"ImageCommand\": \"字符串\",\n \"Description\": \"字符串\",\n \"JdkVersion\": \"字符串\",\n \"ApplicationId\": \"字符串\",\n \"LogOutputConf\": {\n \"ClsLogTopicName\": \"字符串\",\n \"ClsLogsetName\": \"字符串\",\n \"ClsLogTopicId\": \"字符串\",\n \"OutputType\": \"字符串\",\n \"ClsLogsetId\": \"字符串\"\n },\n \"ConfEdited\": \"false\",\n \"EnvironmentId\": \"字符串\",\n \"CpuSpec\": \"0.1\",\n \"DeployMode\": \"字符串\",\n \"SecurityGroupIds\": [\n \"字符串\"\n ],\n \"SourceChannel\": \"0\",\n \"LogEnable\": \"0\",\n \"InitPodNum\": \"2\",\n \"VersionDesc\": \"字符串\",\n \"ImageArgs\": [\n \"字符串\"\n ],\n \"MemorySpec\": \"1024\",\n \"UseRegistryDefaultConfig\": \"true\",\n \"LogConfs\": [\n \"字符串\"\n ],\n \"PkgName\": \"字符串\",\n \"StorageMountConfs\": [\n {\n \"VolumeName\": \"字符串\",\n \"MountPath\": \"字符串\"\n }\n ],\n \"DeployVersion\": \"字符串\",\n \"VersionId\": \"字符串\",\n \"SettingConfs\": [\n {\n \"ConfigDataName\": \"字符串\",\n \"MountedPath\": \"字符串\",\n \"Data\": [\n {\n \"Config\": \"字符串\",\n \"Type\": \"字符串\",\n \"Key\": \"字符串\",\n \"Value\": \"字符串\"\n }\n ]\n }\n ],\n \"StorageConfs\": [\n {\n \"StorageVolPath\": \"字符串\",\n \"StorageVolIp\": \"字符串\",\n \"StorageVolName\": \"字符串\"\n }\n ],\n \"PostStart\": \"字符串\",\n \"OsFlavour\": \"ALPINE\"\n}",
109
- "output": "{\n \"Response\": {\n \"RequestId\": \"422a54ac-9913-4d46-8439-9c05600003b3\",\n \"Result\": \"version-success\"\n }\n}",
110
- "title": "nanjing-test-20220111"
111
105
  }
112
106
  ],
113
107
  "DescribeApplicationAutoscalerList": [
@@ -541,7 +541,7 @@ def doDescribeInitNodeScripts(args, parsed_globals):
541
541
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
542
542
 
543
543
 
544
- def doDeleteQueue(args, parsed_globals):
544
+ def doAttachNodes(args, parsed_globals):
545
545
  g_param = parse_global_arg(parsed_globals)
546
546
 
547
547
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -570,11 +570,11 @@ def doDeleteQueue(args, parsed_globals):
570
570
  client = mod.ThpcClient(cred, g_param[OptionsDefine.Region], profile)
571
571
  client._sdkVersion += ("_CLI_" + __version__)
572
572
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
573
- model = models.DeleteQueueRequest()
573
+ model = models.AttachNodesRequest()
574
574
  model.from_json_string(json.dumps(args))
575
575
  start_time = time.time()
576
576
  while True:
577
- rsp = client.DeleteQueue(model)
577
+ rsp = client.AttachNodes(model)
578
578
  result = rsp.to_json_string()
579
579
  try:
580
580
  json_obj = json.loads(result)
@@ -801,6 +801,58 @@ def doDescribeClusters(args, parsed_globals):
801
801
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
802
802
 
803
803
 
804
+ def doDetachNodes(args, parsed_globals):
805
+ g_param = parse_global_arg(parsed_globals)
806
+
807
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
808
+ cred = credential.CVMRoleCredential()
809
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
810
+ cred = credential.STSAssumeRoleCredential(
811
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
812
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
813
+ )
814
+ 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):
815
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
816
+ else:
817
+ cred = credential.Credential(
818
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
819
+ )
820
+ http_profile = HttpProfile(
821
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
822
+ reqMethod="POST",
823
+ endpoint=g_param[OptionsDefine.Endpoint],
824
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
825
+ )
826
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
827
+ if g_param[OptionsDefine.Language]:
828
+ profile.language = g_param[OptionsDefine.Language]
829
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
830
+ client = mod.ThpcClient(cred, g_param[OptionsDefine.Region], profile)
831
+ client._sdkVersion += ("_CLI_" + __version__)
832
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
833
+ model = models.DetachNodesRequest()
834
+ model.from_json_string(json.dumps(args))
835
+ start_time = time.time()
836
+ while True:
837
+ rsp = client.DetachNodes(model)
838
+ result = rsp.to_json_string()
839
+ try:
840
+ json_obj = json.loads(result)
841
+ except TypeError as e:
842
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
843
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
844
+ break
845
+ cur_time = time.time()
846
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
847
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
848
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
849
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
850
+ else:
851
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
852
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
853
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
854
+
855
+
804
856
  def doAddClusterStorageOption(args, parsed_globals):
805
857
  g_param = parse_global_arg(parsed_globals)
806
858
 
@@ -957,6 +1009,58 @@ def doDeleteCluster(args, parsed_globals):
957
1009
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
958
1010
 
959
1011
 
1012
+ def doDeleteQueue(args, parsed_globals):
1013
+ g_param = parse_global_arg(parsed_globals)
1014
+
1015
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1016
+ cred = credential.CVMRoleCredential()
1017
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1018
+ cred = credential.STSAssumeRoleCredential(
1019
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1020
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1021
+ )
1022
+ 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):
1023
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1024
+ else:
1025
+ cred = credential.Credential(
1026
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1027
+ )
1028
+ http_profile = HttpProfile(
1029
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1030
+ reqMethod="POST",
1031
+ endpoint=g_param[OptionsDefine.Endpoint],
1032
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1033
+ )
1034
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1035
+ if g_param[OptionsDefine.Language]:
1036
+ profile.language = g_param[OptionsDefine.Language]
1037
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1038
+ client = mod.ThpcClient(cred, g_param[OptionsDefine.Region], profile)
1039
+ client._sdkVersion += ("_CLI_" + __version__)
1040
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1041
+ model = models.DeleteQueueRequest()
1042
+ model.from_json_string(json.dumps(args))
1043
+ start_time = time.time()
1044
+ while True:
1045
+ rsp = client.DeleteQueue(model)
1046
+ result = rsp.to_json_string()
1047
+ try:
1048
+ json_obj = json.loads(result)
1049
+ except TypeError as e:
1050
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1051
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1052
+ break
1053
+ cur_time = time.time()
1054
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1055
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1056
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1057
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1058
+ else:
1059
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1060
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1061
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1062
+
1063
+
960
1064
  CLIENT_MAP = {
961
1065
  "v20230321": thpc_client_v20230321,
962
1066
  "v20220401": thpc_client_v20220401,
@@ -982,14 +1086,16 @@ ACTION_MAP = {
982
1086
  "AddQueue": doAddQueue,
983
1087
  "DescribeNodes": doDescribeNodes,
984
1088
  "DescribeInitNodeScripts": doDescribeInitNodeScripts,
985
- "DeleteQueue": doDeleteQueue,
1089
+ "AttachNodes": doAttachNodes,
986
1090
  "DescribeQueues": doDescribeQueues,
987
1091
  "AddNodes": doAddNodes,
988
1092
  "DescribeAutoScalingConfiguration": doDescribeAutoScalingConfiguration,
989
1093
  "DescribeClusters": doDescribeClusters,
1094
+ "DetachNodes": doDetachNodes,
990
1095
  "AddClusterStorageOption": doAddClusterStorageOption,
991
1096
  "DescribeClusterActivities": doDescribeClusterActivities,
992
1097
  "DeleteCluster": doDeleteCluster,
1098
+ "DeleteQueue": doDeleteQueue,
993
1099
 
994
1100
  }
995
1101