tccli 3.0.1151.1__py2.py3-none-any.whl → 3.0.1153.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/services/__init__.py +3 -0
- tccli/services/cdc/v20201214/api.json +101 -20
- tccli/services/cdc/v20201214/examples.json +1 -1
- tccli/services/cloudapp/__init__.py +4 -0
- tccli/services/cloudapp/cloudapp_client.py +195 -0
- tccli/services/cloudapp/v20220530/api.json +259 -0
- tccli/services/cloudapp/v20220530/examples.json +13 -0
- tccli/services/cvm/v20170312/api.json +10 -10
- tccli/services/dlc/v20210125/api.json +19 -1
- tccli/services/dlc/v20210125/examples.json +1 -1
- tccli/services/dsgc/v20190723/api.json +66 -3
- tccli/services/es/v20180416/api.json +19 -1
- tccli/services/es/v20180416/examples.json +1 -1
- tccli/services/ess/v20201111/api.json +1 -1
- tccli/services/essbasic/v20210526/api.json +23 -5
- tccli/services/essbasic/v20210526/examples.json +8 -2
- tccli/services/gaap/v20180529/api.json +22 -2
- tccli/services/gaap/v20180529/examples.json +1 -1
- tccli/services/hunyuan/v20230901/api.json +10 -0
- tccli/services/lcic/v20220817/api.json +19 -1
- tccli/services/lighthouse/v20200324/api.json +4 -4
- tccli/services/lke/v20231130/api.json +1 -1
- tccli/services/mongodb/v20190725/api.json +2 -2
- tccli/services/monitor/v20180724/api.json +136 -121
- tccli/services/monitor/v20180724/examples.json +30 -30
- tccli/services/tcr/v20190924/api.json +1 -1
- tccli/services/tcr/v20190924/examples.json +1 -1
- tccli/services/tdmq/tdmq_client.py +163 -4
- tccli/services/tdmq/v20200217/api.json +279 -0
- tccli/services/tdmq/v20200217/examples.json +24 -0
- tccli/services/tsi/v20210325/api.json +1 -1
- tccli/services/vpc/v20170312/api.json +171 -55
- tccli/services/waf/v20180125/examples.json +1 -1
- {tccli-3.0.1151.1.dist-info → tccli-3.0.1153.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1151.1.dist-info → tccli-3.0.1153.1.dist-info}/RECORD +39 -35
- {tccli-3.0.1151.1.dist-info → tccli-3.0.1153.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1151.1.dist-info → tccli-3.0.1153.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1151.1.dist-info → tccli-3.0.1153.1.dist-info}/license_files/LICENSE +0 -0
@@ -59,7 +59,7 @@
|
|
59
59
|
"CreateAlertRule": [
|
60
60
|
{
|
61
61
|
"document": "",
|
62
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateAlertRule\n<公共请求参数>\n\n{\n \"Receivers\": [\n \"34224\"\n ],\n \"InstanceId\": \"prom-abcd1234\",\n \"Expr\": \"\\\"up{service=\\\\\\\"rig-prometheus-agent\\\\\\\"}>0\\\"\",\n \"Duration\": \"5m\",\n \"RuleName\": \"test\",\n \"RuleState\":
|
62
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateAlertRule\n<公共请求参数>\n\n{\n \"Receivers\": [\n \"34224\"\n ],\n \"InstanceId\": \"prom-abcd1234\",\n \"Expr\": \"\\\"up{service=\\\\\\\"rig-prometheus-agent\\\\\\\"}>0\\\"\",\n \"Duration\": \"5m\",\n \"RuleName\": \"test\",\n \"RuleState\": 2\n}",
|
63
63
|
"output": "{\n \"Response\": {\n \"RequestId\": \"hfd437lxxdj3455-qxdb3eyydvw4doxm\",\n \"RuleId\": \"arule-f2vx2owo\"\n }\n}",
|
64
64
|
"title": "创建报警规则"
|
65
65
|
}
|
@@ -257,8 +257,8 @@
|
|
257
257
|
"CreatePrometheusClusterAgent": [
|
258
258
|
{
|
259
259
|
"document": "关联eks集群",
|
260
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePrometheusClusterAgent\n<公共请求参数>\n\n{\n \"InstanceId\": \"
|
261
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
260
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePrometheusClusterAgent\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-wjeh\",\n \"Agents\": [\n {\n \"EnableExternal\": true,\n \"Region\": \"ap-jehr\",\n \"ClusterId\": \"cls-hrbr\",\n \"ClusterType\": \"eks\",\n \"NotInstallBasicScrape\": true,\n \"InClusterPodConfig\": {\n \"HostNet\": true,\n \"Tolerations\": [\n {\n \"Operator\": \"Exists\",\n \"Effect\": \"NoSchedule\",\n \"Key\": \"key-name\"\n }\n ],\n \"NodeSelector\": [\n {\n \"Name\": \"label-name\",\n \"Value\": \"label-value\"\n }\n ]\n },\n \"NotScrape\": true,\n \"ExternalLabels\": [\n {\n \"Name\": \"label-name\",\n \"Value\": \"label-value\"\n }\n ]\n }\n ]\n}",
|
261
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"ejfhfol-lejrgbf\"\n }\n}",
|
262
262
|
"title": "关联集群"
|
263
263
|
},
|
264
264
|
{
|
@@ -287,7 +287,7 @@
|
|
287
287
|
"CreatePrometheusMultiTenantInstancePostPayMode": [
|
288
288
|
{
|
289
289
|
"document": "",
|
290
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePrometheusMultiTenantInstancePostPayMode\n<公共请求参数>\n\n{\n \"SubnetId\": \"subnet-hjkasfd\",\n \"DataRetentionTime\":
|
290
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePrometheusMultiTenantInstancePostPayMode\n<公共请求参数>\n\n{\n \"SubnetId\": \"subnet-hjkasfd\",\n \"DataRetentionTime\": 30,\n \"VpcId\": \"vpc-thnssd\",\n \"InstanceName\": \"my-prom-gg\",\n \"Zone\": \"ap-chengdu-1\",\n \"GrafanaInstanceId\": \"grafana-xfa222\"\n}",
|
291
291
|
"output": "{\n \"Response\": {\n \"InstanceId\": \"prom-xxxxxx\",\n \"RequestId\": \"3e0dff9d-9ed5-47c3-beb2-a42c1d69e1cc\"\n }\n}",
|
292
292
|
"title": "创建按量 Prometheus 实例"
|
293
293
|
}
|
@@ -311,15 +311,15 @@
|
|
311
311
|
"CreatePrometheusTemp": [
|
312
312
|
{
|
313
313
|
"document": "创建一个模板",
|
314
|
-
"input": "https://monitor.tencentcloudapi.com/?Action=CreatePrometheusTemp\n&Template.Name=t1\n&Template.Describe=一个模板\n&Template.ServiceMonitors.0.Name=s\n&Template.ServiceMonitors.0.Config=abc\n&Template.Level=cluster\n&<公共请求参数>\n\n{\n \"Template\": {\n
|
315
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"eac6b301-a322-493a-8e36-83b295459397\",\n \"TemplateId\": \"temp-
|
314
|
+
"input": "https://monitor.tencentcloudapi.com/?Action=CreatePrometheusTemp\n&Template.Name=t1\n&Template.Describe=一个模板\n&Template.ServiceMonitors.0.Name=s\n&Template.ServiceMonitors.0.Config=abc\n&Template.Level=cluster\n&<公共请求参数>\n\n{\n \"Template\": {\n \"Name\": \"test\",\n \"Describe\": \"test\",\n \"Level\": \"instance\",\n \"RecordRules\": [\n {\n \"Name\": \"testRule\",\n \"Config\": \"abc\",\n \"TemplateId\": \"temp-asdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"RawJobs\": [\n {\n \"Name\": \"abc\",\n \"Config\": \"abc\",\n \"TemplateId\": \"abc\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"ServiceMonitors\": [\n {\n \"Name\": \"test-sm\",\n \"Config\": \"abc\",\n \"TemplateId\": \"temp-asdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"PodMonitors\": [\n {\n \"Name\": \"test-pm\",\n \"Config\": \"abc\",\n \"TemplateId\": \"temp-asdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"TemplateId\": \"temp-asdj\",\n \"UpdateTime\": \"2024-07-16T08:28:54Z\",\n \"Version\": \"v1\",\n \"IsDefault\": true,\n \"AlertDetailRules\": [\n {\n \"Id\": \"rule-asdk\",\n \"Name\": \"testAlert\",\n \"TemplateId\": \"temp-asdj\",\n \"Notification\": {\n \"Enabled\": true,\n \"Type\": \"amp\",\n \"WebHook\": \"abc\",\n \"AlertManager\": {\n \"ClusterType\": \"tke\",\n \"ClusterId\": \"cls-askj\",\n \"Url\": \"http://asasdkfh:9000\"\n },\n \"RepeatInterval\": \"5m\",\n \"TimeRangeStart\": \"00:00:00\",\n \"TimeRangeEnd\": \"23:59:59\",\n \"NotifyWay\": [\n \"abc\"\n ],\n \"ReceiverGroups\": [\n \"notice-yakj\"\n ],\n \"PhoneNotifyOrder\": [\n 1\n ],\n \"PhoneCircleTimes\": 0,\n \"PhoneInnerInterval\": 0,\n \"PhoneCircleInterval\": 0,\n \"PhoneArriveNotice\": true\n },\n \"Rules\": [\n {\n \"Name\": \"rule-ajdb\",\n \"Rule\": \"avg by (abc) skdj\",\n \"Labels\": [\n {\n \"Name\": \"label-name\",\n \"Value\": \"label-value\"\n }\n ],\n \"Template\": \"temp-asdj\",\n \"For\": \"5m\",\n \"Describe\": \"test-temp\",\n \"Annotations\": [\n {\n \"Name\": \"label-name\",\n \"Value\": \"label-value\"\n }\n ],\n \"RuleState\": 0\n }\n ],\n \"UpdatedAt\": \"2024-07-16 16:28:54\",\n \"ClusterId\": \"cls-djfb\",\n \"Interval\": \"5m\"\n }\n ],\n \"TargetsTotal\": 0\n }\n}",
|
315
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"eac6b301-a322-493a-8e36-83b295459397\",\n \"TemplateId\": \"temp-lejrh\"\n }\n}",
|
316
316
|
"title": "创建一个模板"
|
317
317
|
}
|
318
318
|
],
|
319
319
|
"CreateRecordingRule": [
|
320
320
|
{
|
321
321
|
"document": "",
|
322
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateRecordingRule\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-xxxxsfds\",\n \"RuleState\":
|
322
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateRecordingRule\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-xxxxsfds\",\n \"RuleState\": 2,\n \"Group\": \"LS0tDQpuYW1lOiBleGFtcGxlDQpydWxlczoNCiAgLSByZWNvcmQ6IGpvYjpodHRwX2lucHJvZ3Jlc3NfcmVxdWVzdHM6c3VtDQogICAgZXhwcjogc3VtIGJ5IChqb2IpIChodHRwX2lucHJvZ3Jlc3NfcmVxdWVzdHMp\",\n \"Name\": \"1\"\n}",
|
323
323
|
"output": "{\n \"Response\": {\n \"RequestId\": \"xyz\",\n \"RuleId\": \"rrule-xyz\"\n }\n}",
|
324
324
|
"title": "创建预聚合规则"
|
325
325
|
}
|
@@ -423,7 +423,7 @@
|
|
423
423
|
"DeletePrometheusClusterAgent": [
|
424
424
|
{
|
425
425
|
"document": "删除agent",
|
426
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeletePrometheusClusterAgent\n<公共请求参数>\n\n{\n \"Agents\": [\n {\n \"ClusterType\": \"
|
426
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeletePrometheusClusterAgent\n<公共请求参数>\n\n{\n \"Agents\": [\n {\n \"ClusterType\": \"cls-kehr\",\n \"ClusterId\": \"tke\",\n \"Describe\": \"test-des\"\n }\n ],\n \"InstanceId\": \"prom-sjerg\"\n}",
|
427
427
|
"output": "{\n \"Response\": {\n \"RequestId\": \"eac6b301-a322-493a-8e36-83b295459397\"\n }\n}",
|
428
428
|
"title": "删除agent"
|
429
429
|
}
|
@@ -431,7 +431,7 @@
|
|
431
431
|
"DeletePrometheusConfig": [
|
432
432
|
{
|
433
433
|
"document": "删除prometheus配置",
|
434
|
-
"input": "https://monitor.tencentcloudapi.com/?Action=DeletePrometheusConfig\n&InstanceId=prom-
|
434
|
+
"input": "https://monitor.tencentcloudapi.com/?Action=DeletePrometheusConfig\n&InstanceId=prom-pejrh\n&ClusterType=tke\n&ClusterId=cls-hegr\n&<公共请求参数>",
|
435
435
|
"output": "{\n \"Response\": {\n \"RequestId\": \"eac6b301-a322-493a-8e36-83b295459397\"\n }\n}",
|
436
436
|
"title": "删除prometheus配置"
|
437
437
|
}
|
@@ -439,7 +439,7 @@
|
|
439
439
|
"DeletePrometheusRecordRuleYaml": [
|
440
440
|
{
|
441
441
|
"document": "删除聚合规则",
|
442
|
-
"input": "https://monitor.tencentcloudapi.com/?Action=DeletePrometheusRecordRuleYaml\n&InstanceId=prom-
|
442
|
+
"input": "https://monitor.tencentcloudapi.com/?Action=DeletePrometheusRecordRuleYaml\n&InstanceId=prom-ejfdgh\n&Names.0=test-rule\n&<公共请求参数>",
|
443
443
|
"output": "{\n \"Response\": {\n \"RequestId\": \"eac6b301-a322-493a-8e36-83b295459397\"\n }\n}",
|
444
444
|
"title": "删除聚合规则"
|
445
445
|
}
|
@@ -487,7 +487,7 @@
|
|
487
487
|
"DeleteServiceDiscovery": [
|
488
488
|
{
|
489
489
|
"document": "",
|
490
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteServiceDiscovery\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-sdfk2342a\",\n \"Yaml\": \"yaml\",\n \"Type\":
|
490
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteServiceDiscovery\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-sdfk2342a\",\n \"Yaml\": \"apiVersion: monitoring.coreos.com/v1\\nkind: ServiceMonitor\\nmetadata:\\n name: go-demo # 填写一个唯一名称\\n namespace: cm-prometheus # namespace固定,不要修改\\nspec:\\n endpoints:\\n - interval: 30s\\n # 填写service yaml中Prometheus Exporter对应的Port的Name\\n port: 2112\\n # 填写Prometheus Exporter对应的Path的值,不填默认/metrics\\n path: /metrics\\n relabelings:\\n # ** 必须要有一个 label 为 application,这里假设 k8s 有一个 label 为 app,\\n # 我们通过 relabel 的 replace 动作把它替换成了 application\\n - action: replace\\n sourceLabels: [__meta_kubernetes_pod_label_app]\\n targetLabel: application\\n # 选择要监控service所在的namespace\\n namespaceSelector:\\n matchNames:\\n - golang-demo\\n # 填写要监控service的Label值,以定位目标service\\n selector:\\n matchLabels:\\n app: golang-app-demo\",\n \"Type\": 1,\n \"KubeClusterId\": \"cls-pwerf3k3\",\n \"KubeType\": 1\n}",
|
491
491
|
"output": "{\n \"Response\": {\n \"RequestId\": \"3e0dff9d-9ed5-47c3-beb2-a42c1d69e1cc\"\n }\n}",
|
492
492
|
"title": "删除服务发现"
|
493
493
|
}
|
@@ -839,8 +839,8 @@
|
|
839
839
|
"DescribePrometheusClusterAgents": [
|
840
840
|
{
|
841
841
|
"document": "拉取agent信息",
|
842
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusClusterAgents\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"Limit\": 1,\n \"Offset\": 1\n}",
|
843
|
-
"output": "{\n \"Response\": {\n \"Agents\": [\n {\n \"
|
842
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusClusterAgents\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-abc\",\n \"Limit\": 1,\n \"Offset\": 1\n}",
|
843
|
+
"output": "{\n \"Response\": {\n \"Agents\": [\n {\n \"ClusterId\": \"cls-abc\",\n \"ClusterName\": \"abc\",\n \"ClusterType\": \"tke\",\n \"EnableExternal\": false,\n \"ExternalLabels\": [\n {\n \"Name\": \"cluster\",\n \"Value\": \"cls-cde\"\n },\n {\n \"Name\": \"cluster_type\",\n \"Value\": \"tke\"\n }\n ],\n \"FailedReason\": \"\",\n \"Name\": \"\",\n \"ReadyAgentNum\": 1,\n \"Region\": \"ap-guangzhou\",\n \"Status\": \"normal\",\n \"VpcId\": \"vpc-abc\"\n }\n ],\n \"IsFirstBind\": false,\n \"RequestId\": \"56ce7-sdsd\",\n \"ImageNeedUpdate\": false,\n \"Total\": 1\n }\n}",
|
844
844
|
"title": "拉取agent信息"
|
845
845
|
}
|
846
846
|
],
|
@@ -848,7 +848,7 @@
|
|
848
848
|
{
|
849
849
|
"document": "拉取prometheus配置",
|
850
850
|
"input": "https://monitor.tencentcloudapi.com/?Action=DescribePrometheusConfig\r\n&InstanceId=prom-xxx\r\n&ClusterType=tke\r\n&ClusterId=cls-xxx\r\n&<公共请求参数>",
|
851
|
-
"output": "{\n \"Response\": {\n \"Config\": \"abc\",\n \"ServiceMonitors\": [\n {\n \"Name\": \"
|
851
|
+
"output": "{\n \"Response\": {\n \"Config\": \"abc\",\n \"ServiceMonitors\": [\n {\n \"Name\": \"test-sm\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"PodMonitors\": [\n {\n \"Name\": \"test-pm\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"RawJobs\": [\n {\n \"Name\": \"test-rawjob\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"Probes\": [\n {\n \"Name\": \"test-probe\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"ImageNeedUpdate\": true,\n \"RequestId\": \"abc\"\n }\n}",
|
852
852
|
"title": "拉取prometheus配置"
|
853
853
|
}
|
854
854
|
],
|
@@ -856,7 +856,7 @@
|
|
856
856
|
{
|
857
857
|
"document": "获得实例级别监控配置",
|
858
858
|
"input": "https://monitor.tencentcloudapi.com/?Action=DescribePrometheusGlobalConfig\n&InstanceId=prom-xxx\n&<公共请求参数>",
|
859
|
-
"output": "{\n \"Response\": {\n \"Config\": \"abc\",\n \"ServiceMonitors\": [\n {\n \"Name\": \"
|
859
|
+
"output": "{\n \"Response\": {\n \"Config\": \"abc\",\n \"ServiceMonitors\": [\n {\n \"Name\": \"test-sm\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"PodMonitors\": [\n {\n \"Name\": \"test-pm\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"RawJobs\": [\n {\n \"Name\": \"test-rawjob\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"Probes\": [\n {\n \"Name\": \"test-probe\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
860
860
|
"title": "获得实例级别监控配置"
|
861
861
|
}
|
862
862
|
],
|
@@ -872,21 +872,21 @@
|
|
872
872
|
{
|
873
873
|
"document": "查询TMP实例详情",
|
874
874
|
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusInstanceDetail\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\"\n}",
|
875
|
-
"output": "{\n \"Response\": {\n \"InstanceId\": \"
|
875
|
+
"output": "{\n \"Response\": {\n \"InstanceId\": \"prom-skdfj\",\n \"InstanceName\": \"test-prom\",\n \"VpcId\": \"vpc-sjdh\",\n \"SubnetId\": \"subnet-kdhe\",\n \"InstanceStatus\": 3,\n \"ChargeStatus\": 1,\n \"EnableGrafana\": 0,\n \"GrafanaURL\": \"http://djeb:9000\",\n \"InstanceChargeType\": 0,\n \"SpecName\": \"name-sjdb\",\n \"DataRetentionTime\": 15,\n \"ExpireTime\": \"2024-07-16 16:28:54\",\n \"AutoRenewFlag\": 0,\n \"RequestId\": \"skdbfdi-akenfhl\"\n }\n}",
|
876
876
|
"title": "查询TMP实例详情"
|
877
877
|
}
|
878
878
|
],
|
879
879
|
"DescribePrometheusInstanceInitStatus": [
|
880
880
|
{
|
881
881
|
"document": "获取初始化任务状态",
|
882
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusInstanceInitStatus\n<公共请求参数>\n\n{\n \"InstanceId\": \"
|
883
|
-
"output": "{\n \"Response\": {\n \"Status\": \"
|
882
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusInstanceInitStatus\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-asdf1234\"\n}",
|
883
|
+
"output": "{\n \"Response\": {\n \"Status\": \"initializing\",\n \"Steps\": [\n {\n \"Step\": \"preCheck\",\n \"LifeState\": \"success\",\n \"StartAt\": \"2022-04-19T07:29:46Z\",\n \"EndAt\": \"2022-04-19T07:30:46Z\",\n \"FailedMsg\": \"message\"\n }\n ],\n \"EksClusterId\": \"cls-asdf1234\",\n \"SecurityGroupId\": \"sg-asdf1234\",\n \"RequestId\": \"abc-123-asdfghjk\"\n }\n}",
|
884
884
|
"title": "获取初始化任务状态"
|
885
885
|
},
|
886
886
|
{
|
887
887
|
"document": "获取2.0实例初始化任务状态",
|
888
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusInstanceInitStatus\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-
|
889
|
-
"output": "{\n \"Response\": {\n \"Status\": \"
|
888
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusInstanceInitStatus\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-asdf1234\"\n}",
|
889
|
+
"output": "{\n \"Response\": {\n \"Status\": \"initializing\",\n \"Steps\": [\n {\n \"Step\": \"preCheck\",\n \"LifeState\": \"success\",\n \"StartAt\": \"2022-04-19T07:29:46Z\",\n \"EndAt\": \"2022-04-19T07:30:46Z\",\n \"FailedMsg\": \"message\"\n }\n ],\n \"EksClusterId\": \"cls-asdf1234\",\n \"SecurityGroupId\": \"sg-asdf1234\",\n \"RequestId\": \"abc-123-asdfghjk\"\n }\n}",
|
890
890
|
"title": "获取2.0实例初始化任务状态"
|
891
891
|
}
|
892
892
|
],
|
@@ -910,7 +910,7 @@
|
|
910
910
|
{
|
911
911
|
"document": "获取实例列表",
|
912
912
|
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusInstancesOverview\n<公共请求参数>\n\n{\n \"Limit\": 1,\n \"Filters\": [\n {\n \"Name\": \"Name\",\n \"Values\": [\n \"alert-test\"\n ]\n }\n ],\n \"Offset\": 1\n}",
|
913
|
-
"output": "{\n \"Response\": {\n \"Instances\": [\n {\n \"InstanceStatus\":
|
913
|
+
"output": "{\n \"Response\": {\n \"Instances\": [\n {\n \"InstanceStatus\": 3,\n \"BoundNormal\": 1,\n \"VpcId\": \"vpc-sjdfb\",\n \"AutoRenewFlag\": 0,\n \"InstanceId\": \"prom-ajsh\",\n \"BoundTotal\": 1,\n \"ExpireTime\": \"2024-07-16 16:28:54\",\n \"SpecName\": \"spec-name\",\n \"InstanceChargeType\": 2,\n \"EnableGrafana\": 0,\n \"DataRetentionTime\": 15,\n \"GrafanaURL\": \"http://1.1.1.1:9000\",\n \"SubnetId\": \"subnet-ljeb\",\n \"InstanceName\": \"test-prom\",\n \"ChargeStatus\": 1,\n \"ResourcePackageStatus\": 1,\n \"ResourcePackageSpecName\": \"pkg-name\"\n }\n ],\n \"Total\": 1,\n \"RequestId\": \"sjehg-jdgrg\"\n }\n}",
|
914
914
|
"title": "获取实例列表"
|
915
915
|
}
|
916
916
|
],
|
@@ -950,7 +950,7 @@
|
|
950
950
|
{
|
951
951
|
"document": "获取targets列表",
|
952
952
|
"input": "https://monitor.tencentcloudapi.com/?Action=DescribePrometheusTargetsTMP\n&InstanceId=prom-xxx\n&ClusterType=tke\n&ClusterId=cls-xxx\n&<公共请求参数>",
|
953
|
-
"output": "{\n \"Response\": {\n \"Jobs\": [\n {\n \"Targets\": [\n {}\n ],\n \"
|
953
|
+
"output": "{\n \"Response\": {\n \"Jobs\": [\n {\n \"Targets\": [\n {}\n ],\n \"Total\": 1,\n \"Up\": 0,\n \"JobName\": \"test-job\"\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
954
954
|
"title": "获取targets列表"
|
955
955
|
}
|
956
956
|
],
|
@@ -958,7 +958,7 @@
|
|
958
958
|
{
|
959
959
|
"document": "拉取模板列表",
|
960
960
|
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusTemp\n<公共请求参数>\n\n{\n \"Limit\": 1,\n \"Filters\": [\n {\n \"Name\": \"ID\",\n \"Values\": [\n \"alert-test\"\n ]\n }\n ],\n \"Offset\": 1\n}",
|
961
|
-
"output": "{\n \"Response\": {\n \"Templates\": [\n {\n \"Name\": \"
|
961
|
+
"output": "{\n \"Response\": {\n \"Templates\": [\n {\n \"Name\": \"test\",\n \"Describe\": \"test\",\n \"Level\": \"instance\",\n \"RecordRules\": [\n {\n \"Name\": \"testRule\",\n \"Config\": \"abc\",\n \"TemplateId\": \"temp-asdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"RawJobs\": [\n {\n \"Name\": \"abc\",\n \"Config\": \"abc\",\n \"TemplateId\": \"abc\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"ServiceMonitors\": [\n {\n \"Name\": \"test-sm\",\n \"Config\": \"abc\",\n \"TemplateId\": \"temp-asdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"PodMonitors\": [\n {\n \"Name\": \"test-pm\",\n \"Config\": \"abc\",\n \"TemplateId\": \"temp-asdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"TemplateId\": \"temp-asdj\",\n \"UpdateTime\": \"2024-07-16T08:28:54Z\",\n \"Version\": \"v1\",\n \"IsDefault\": true,\n \"AlertDetailRules\": [\n {\n \"Id\": \"rule-asdk\",\n \"Name\": \"testAlert\",\n \"TemplateId\": \"temp-asdj\",\n \"Notification\": {\n \"Enabled\": true,\n \"Type\": \"amp\",\n \"WebHook\": \"abc\",\n \"AlertManager\": {\n \"ClusterType\": \"tke\",\n \"ClusterId\": \"cls-askj\",\n \"Url\": \"http://asasdkfh:9000\"\n },\n \"RepeatInterval\": \"5m\",\n \"TimeRangeStart\": \"00:00:00\",\n \"TimeRangeEnd\": \"23:59:59\",\n \"NotifyWay\": [\n \"abc\"\n ],\n \"ReceiverGroups\": [\n \"notice-yakj\"\n ],\n \"PhoneNotifyOrder\": [\n 1\n ],\n \"PhoneCircleTimes\": 0,\n \"PhoneInnerInterval\": 0,\n \"PhoneCircleInterval\": 0,\n \"PhoneArriveNotice\": true\n },\n \"Rules\": [\n {\n \"Name\": \"rule-ajdb\",\n \"Rule\": \"avg by (abc) skdj\",\n \"Labels\": [\n {\n \"Name\": \"label-name\",\n \"Value\": \"label-value\"\n }\n ],\n \"Template\": \"temp-asdj\",\n \"For\": \"5m\",\n \"Describe\": \"test-temp\",\n \"Annotations\": [\n {\n \"Name\": \"label-name\",\n \"Value\": \"label-value\"\n }\n ],\n \"RuleState\": 0\n }\n ],\n \"UpdatedAt\": \"2024-07-16 16:28:54\",\n \"ClusterId\": \"cls-djfb\"\n }\n ],\n \"TargetsTotal\": 0\n }\n ],\n \"Total\": 1,\n \"RequestId\": \"skdh-afbri\"\n }\n}",
|
962
962
|
"title": "拉取模板列表"
|
963
963
|
}
|
964
964
|
],
|
@@ -966,14 +966,14 @@
|
|
966
966
|
{
|
967
967
|
"document": "拉取同步目标",
|
968
968
|
"input": "https://monitor.tencentcloudapi.com/?Action=DescribePrometheusTempSync\n&TemplateId=\"temp-xxx\"\n&<公共请求参数>",
|
969
|
-
"output": "{\n \"Response\": {\n \"Targets\": [\n {\n \"Region\": \"
|
969
|
+
"output": "{\n \"Response\": {\n \"Targets\": [\n {\n \"Region\": \"ap-beijing\",\n \"InstanceId\": \"prom-sjfgh\",\n \"ClusterId\": \"cls-kdje\",\n \"SyncTime\": \"2024-07-16 16:28:54\",\n \"Version\": \"v1\",\n \"ClusterType\": \"tke\",\n \"InstanceName\": \"test-prom\",\n \"ClusterName\": \"test-cluster\"\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
970
970
|
"title": "拉取同步目标"
|
971
971
|
}
|
972
972
|
],
|
973
973
|
"DescribePrometheusZones": [
|
974
974
|
{
|
975
975
|
"document": "列出 Prometheus 服务可用区",
|
976
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusZones\n<公共请求参数>\n\n{\n \"RegionId\": \
|
976
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusZones\n<公共请求参数>\n\n{\n \"RegionId\": 1\n}",
|
977
977
|
"output": "{\n \"Response\": {\n \"ZoneSet\": [\n {\n \"Zone\": \"abc\",\n \"ZoneId\": 0,\n \"ZoneState\": 0,\n \"RegionId\": 0,\n \"ZoneName\": \"abc\",\n \"ZoneResourceState\": 0\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
978
978
|
"title": "列出 Prometheus 服务可用区"
|
979
979
|
}
|
@@ -1159,7 +1159,7 @@
|
|
1159
1159
|
"ModifyPrometheusAgentExternalLabels": [
|
1160
1160
|
{
|
1161
1161
|
"document": "修改label",
|
1162
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyPrometheusAgentExternalLabels\n<公共请求参数>\n\n{\n \"InstanceId\": \"
|
1162
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyPrometheusAgentExternalLabels\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-jegh\",\n \"ClusterId\": \"cls-uerhf\",\n \"ExternalLabels\": [\n {\n \"Name\": \"label-name\",\n \"Value\": \"label-value\"\n }\n ]\n}",
|
1163
1163
|
"output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
|
1164
1164
|
"title": "修改label"
|
1165
1165
|
}
|
@@ -1174,10 +1174,10 @@
|
|
1174
1174
|
],
|
1175
1175
|
"ModifyPrometheusConfig": [
|
1176
1176
|
{
|
1177
|
-
"document": "
|
1177
|
+
"document": "修改采集配置",
|
1178
1178
|
"input": "https://monitor.tencentcloudapi.com/?Action=ModifyPrometheusConfig\n&InstanceId=prom-xxx\n&ClusterType=tke\n&ClusterId=cls-xxx\n&<公共请求参数>",
|
1179
1179
|
"output": "{\n \"Response\": {\n \"RequestId\": \"eac6b301-a322-493a-8e36-83b295459397\"\n }\n}",
|
1180
|
-
"title": "
|
1180
|
+
"title": "修改采集配置"
|
1181
1181
|
}
|
1182
1182
|
],
|
1183
1183
|
"ModifyPrometheusGlobalNotification": [
|
@@ -1223,8 +1223,8 @@
|
|
1223
1223
|
"RunPrometheusInstance": [
|
1224
1224
|
{
|
1225
1225
|
"document": "初始化实例",
|
1226
|
-
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunPrometheusInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-
|
1227
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
1226
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunPrometheusInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-asdfghjk\"\n}",
|
1227
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"abc-123-asdfghjk\"\n }\n}",
|
1228
1228
|
"title": "初始化实例"
|
1229
1229
|
}
|
1230
1230
|
],
|
@@ -1025,7 +1025,7 @@
|
|
1025
1025
|
},
|
1026
1026
|
{
|
1027
1027
|
"disabled": false,
|
1028
|
-
"document": "1: Illegal
|
1028
|
+
"document": "1: Illegal(名称非法), 2:Reserved(名字保留), 3:Existed(名字已存在)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1029
1029
|
"example": "1",
|
1030
1030
|
"member": "int64",
|
1031
1031
|
"name": "DetailCode",
|
@@ -878,7 +878,7 @@
|
|
878
878
|
],
|
879
879
|
"ModifyUserPasswordPersonal": [
|
880
880
|
{
|
881
|
-
"document": "ccr
|
881
|
+
"document": "ccr修改个人用户登录密码",
|
882
882
|
"input": "https://tcr.tencentcloudapi.com/?Action=ModifyUserPasswordPersonal\r\n&Password=XXXXX\r\n&<公共请求参数>",
|
883
883
|
"output": "{\n \"Response\": {\n \"RequestId\": \"eac6b301-a322-493a-8e36-83b295459397\"\n }\n}",
|
884
884
|
"title": "修改个人用户登录密码"
|
@@ -1057,6 +1057,58 @@ def doRewindCmqQueue(args, parsed_globals):
|
|
1057
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1058
1058
|
|
1059
1059
|
|
1060
|
+
def doDescribeRocketMQTopicStats(args, parsed_globals):
|
1061
|
+
g_param = parse_global_arg(parsed_globals)
|
1062
|
+
|
1063
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1064
|
+
cred = credential.CVMRoleCredential()
|
1065
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1066
|
+
cred = credential.STSAssumeRoleCredential(
|
1067
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1068
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1069
|
+
)
|
1070
|
+
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):
|
1071
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1072
|
+
else:
|
1073
|
+
cred = credential.Credential(
|
1074
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1075
|
+
)
|
1076
|
+
http_profile = HttpProfile(
|
1077
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1078
|
+
reqMethod="POST",
|
1079
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1080
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1081
|
+
)
|
1082
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1083
|
+
if g_param[OptionsDefine.Language]:
|
1084
|
+
profile.language = g_param[OptionsDefine.Language]
|
1085
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1086
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1088
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
+
model = models.DescribeRocketMQTopicStatsRequest()
|
1090
|
+
model.from_json_string(json.dumps(args))
|
1091
|
+
start_time = time.time()
|
1092
|
+
while True:
|
1093
|
+
rsp = client.DescribeRocketMQTopicStats(model)
|
1094
|
+
result = rsp.to_json_string()
|
1095
|
+
try:
|
1096
|
+
json_obj = json.loads(result)
|
1097
|
+
except TypeError as e:
|
1098
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1099
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1100
|
+
break
|
1101
|
+
cur_time = time.time()
|
1102
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1103
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1104
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1105
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1106
|
+
else:
|
1107
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1108
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1109
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
|
+
|
1111
|
+
|
1060
1112
|
def doCreateTopic(args, parsed_globals):
|
1061
1113
|
g_param = parse_global_arg(parsed_globals)
|
1062
1114
|
|
@@ -2045,6 +2097,58 @@ def doModifyPublicNetworkAccessPoint(args, parsed_globals):
|
|
2045
2097
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2046
2098
|
|
2047
2099
|
|
2100
|
+
def doModifyRocketMQInstance(args, parsed_globals):
|
2101
|
+
g_param = parse_global_arg(parsed_globals)
|
2102
|
+
|
2103
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2104
|
+
cred = credential.CVMRoleCredential()
|
2105
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2106
|
+
cred = credential.STSAssumeRoleCredential(
|
2107
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2108
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2109
|
+
)
|
2110
|
+
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):
|
2111
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2112
|
+
else:
|
2113
|
+
cred = credential.Credential(
|
2114
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2115
|
+
)
|
2116
|
+
http_profile = HttpProfile(
|
2117
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2118
|
+
reqMethod="POST",
|
2119
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2120
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2121
|
+
)
|
2122
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2123
|
+
if g_param[OptionsDefine.Language]:
|
2124
|
+
profile.language = g_param[OptionsDefine.Language]
|
2125
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2126
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
2127
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2128
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2129
|
+
model = models.ModifyRocketMQInstanceRequest()
|
2130
|
+
model.from_json_string(json.dumps(args))
|
2131
|
+
start_time = time.time()
|
2132
|
+
while True:
|
2133
|
+
rsp = client.ModifyRocketMQInstance(model)
|
2134
|
+
result = rsp.to_json_string()
|
2135
|
+
try:
|
2136
|
+
json_obj = json.loads(result)
|
2137
|
+
except TypeError as e:
|
2138
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2139
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2140
|
+
break
|
2141
|
+
cur_time = time.time()
|
2142
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2143
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2144
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2145
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2146
|
+
else:
|
2147
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2148
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2149
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2150
|
+
|
2151
|
+
|
2048
2152
|
def doCreateCmqQueue(args, parsed_globals):
|
2049
2153
|
g_param = parse_global_arg(parsed_globals)
|
2050
2154
|
|
@@ -2773,6 +2877,58 @@ def doDescribeRabbitMQVipInstance(args, parsed_globals):
|
|
2773
2877
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2774
2878
|
|
2775
2879
|
|
2880
|
+
def doCreateEnvironmentRole(args, parsed_globals):
|
2881
|
+
g_param = parse_global_arg(parsed_globals)
|
2882
|
+
|
2883
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2884
|
+
cred = credential.CVMRoleCredential()
|
2885
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2886
|
+
cred = credential.STSAssumeRoleCredential(
|
2887
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2888
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2889
|
+
)
|
2890
|
+
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):
|
2891
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2892
|
+
else:
|
2893
|
+
cred = credential.Credential(
|
2894
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2895
|
+
)
|
2896
|
+
http_profile = HttpProfile(
|
2897
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2898
|
+
reqMethod="POST",
|
2899
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2900
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2901
|
+
)
|
2902
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2903
|
+
if g_param[OptionsDefine.Language]:
|
2904
|
+
profile.language = g_param[OptionsDefine.Language]
|
2905
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2906
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
2907
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2908
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2909
|
+
model = models.CreateEnvironmentRoleRequest()
|
2910
|
+
model.from_json_string(json.dumps(args))
|
2911
|
+
start_time = time.time()
|
2912
|
+
while True:
|
2913
|
+
rsp = client.CreateEnvironmentRole(model)
|
2914
|
+
result = rsp.to_json_string()
|
2915
|
+
try:
|
2916
|
+
json_obj = json.loads(result)
|
2917
|
+
except TypeError as e:
|
2918
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2919
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2920
|
+
break
|
2921
|
+
cur_time = time.time()
|
2922
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2923
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2924
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2925
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2926
|
+
else:
|
2927
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2928
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2929
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2930
|
+
|
2931
|
+
|
2776
2932
|
def doDescribeRocketMQPublicAccessMonitorData(args, parsed_globals):
|
2777
2933
|
g_param = parse_global_arg(parsed_globals)
|
2778
2934
|
|
@@ -5425,7 +5581,7 @@ def doModifyRabbitMQVipInstance(args, parsed_globals):
|
|
5425
5581
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5426
5582
|
|
5427
5583
|
|
5428
|
-
def
|
5584
|
+
def doDescribeRocketMQTopicsByGroup(args, parsed_globals):
|
5429
5585
|
g_param = parse_global_arg(parsed_globals)
|
5430
5586
|
|
5431
5587
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5454,11 +5610,11 @@ def doCreateEnvironmentRole(args, parsed_globals):
|
|
5454
5610
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
5455
5611
|
client._sdkVersion += ("_CLI_" + __version__)
|
5456
5612
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5457
|
-
model = models.
|
5613
|
+
model = models.DescribeRocketMQTopicsByGroupRequest()
|
5458
5614
|
model.from_json_string(json.dumps(args))
|
5459
5615
|
start_time = time.time()
|
5460
5616
|
while True:
|
5461
|
-
rsp = client.
|
5617
|
+
rsp = client.DescribeRocketMQTopicsByGroup(model)
|
5462
5618
|
result = rsp.to_json_string()
|
5463
5619
|
try:
|
5464
5620
|
json_obj = json.loads(result)
|
@@ -7276,6 +7432,7 @@ ACTION_MAP = {
|
|
7276
7432
|
"CreateRabbitMQUser": doCreateRabbitMQUser,
|
7277
7433
|
"DescribeRabbitMQVipInstances": doDescribeRabbitMQVipInstances,
|
7278
7434
|
"RewindCmqQueue": doRewindCmqQueue,
|
7435
|
+
"DescribeRocketMQTopicStats": doDescribeRocketMQTopicStats,
|
7279
7436
|
"CreateTopic": doCreateTopic,
|
7280
7437
|
"DescribeCmqQueues": doDescribeCmqQueues,
|
7281
7438
|
"DescribeEnvironments": doDescribeEnvironments,
|
@@ -7295,6 +7452,7 @@ ACTION_MAP = {
|
|
7295
7452
|
"DeleteCluster": doDeleteCluster,
|
7296
7453
|
"DeleteCmqTopic": doDeleteCmqTopic,
|
7297
7454
|
"ModifyPublicNetworkAccessPoint": doModifyPublicNetworkAccessPoint,
|
7455
|
+
"ModifyRocketMQInstance": doModifyRocketMQInstance,
|
7298
7456
|
"CreateCmqQueue": doCreateCmqQueue,
|
7299
7457
|
"ModifyRocketMQGroup": doModifyRocketMQGroup,
|
7300
7458
|
"ModifyCmqTopicAttribute": doModifyCmqTopicAttribute,
|
@@ -7309,6 +7467,7 @@ ACTION_MAP = {
|
|
7309
7467
|
"CreateRocketMQEnvironmentRole": doCreateRocketMQEnvironmentRole,
|
7310
7468
|
"DescribeRocketMQConsumerConnectionDetail": doDescribeRocketMQConsumerConnectionDetail,
|
7311
7469
|
"DescribeRabbitMQVipInstance": doDescribeRabbitMQVipInstance,
|
7470
|
+
"CreateEnvironmentRole": doCreateEnvironmentRole,
|
7312
7471
|
"DescribeRocketMQPublicAccessMonitorData": doDescribeRocketMQPublicAccessMonitorData,
|
7313
7472
|
"ImportRocketMQTopics": doImportRocketMQTopics,
|
7314
7473
|
"DescribeSubscriptions": doDescribeSubscriptions,
|
@@ -7360,7 +7519,7 @@ ACTION_MAP = {
|
|
7360
7519
|
"DescribeMsg": doDescribeMsg,
|
7361
7520
|
"SendBatchMessages": doSendBatchMessages,
|
7362
7521
|
"ModifyRabbitMQVipInstance": doModifyRabbitMQVipInstance,
|
7363
|
-
"
|
7522
|
+
"DescribeRocketMQTopicsByGroup": doDescribeRocketMQTopicsByGroup,
|
7364
7523
|
"DescribeRocketMQTopics": doDescribeRocketMQTopics,
|
7365
7524
|
"DescribeRocketMQClusters": doDescribeRocketMQClusters,
|
7366
7525
|
"SendMessages": doSendMessages,
|