tccli 3.0.1151.1__py2.py3-none-any.whl → 3.0.1152.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -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\": \"2\"\n}",
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
  }
@@ -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\": \"30\",\n \"VpcId\": \"vpc-thnssd\",\n \"InstanceName\": \"my-prom-gg\",\n \"Zone\": \"ap-chengdu-1\",\n \"GrafanaInstanceId\": \"grafana-xfa222\"\n}",
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
  }
@@ -319,7 +319,7 @@
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\": \"2\",\n \"Group\": \"LS0tDQpuYW1lOiBleGFtcGxlDQpydWxlczoNCiAgLSByZWNvcmQ6IGpvYjpodHRwX2lucHJvZ3Jlc3NfcmVxdWVzdHM6c3VtDQogICAgZXhwcjogc3VtIGJ5IChqb2IpIChodHRwX2lucHJvZ3Jlc3NfcmVxdWVzdHMp\",\n \"Name\": \"1\"\n}",
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
  }
@@ -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\": \"1\",\n \"KubeClusterId\": \"cls-pwerf3k3\",\n \"KubeType\": \"1\"\n}",
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
  }
@@ -880,13 +880,13 @@
880
880
  {
881
881
  "document": "获取初始化任务状态",
882
882
  "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusInstanceInitStatus\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\"\n}",
883
- "output": "{\n \"Response\": {\n \"Status\": \"abc\",\n \"Steps\": [\n {\n \"Step\": \"abc\",\n \"LifeState\": \"abc\",\n \"StartAt\": \"abc\",\n \"EndAt\": \"abc\",\n \"FailedMsg\": \"abc\"\n }\n ],\n \"EksClusterId\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
883
+ "output": "{\n \"Response\": {\n \"Status\": \"abc\",\n \"Steps\": [\n {\n \"Step\": \"abc\",\n \"LifeState\": \"abc\",\n \"StartAt\": \"abc\",\n \"EndAt\": \"abc\",\n \"FailedMsg\": \"abc\"\n }\n ],\n \"EksClusterId\": \"abc\",\n \"SecurityGroupId\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
884
884
  "title": "获取初始化任务状态"
885
885
  },
886
886
  {
887
887
  "document": "获取2.0实例初始化任务状态",
888
888
  "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePrometheusInstanceInitStatus\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-7vp71ppt\"\n}",
889
- "output": "{\n \"Response\": {\n \"Status\": \"abc\",\n \"Steps\": [\n {\n \"Step\": \"abc\",\n \"LifeState\": \"abc\",\n \"StartAt\": \"abc\",\n \"EndAt\": \"abc\",\n \"FailedMsg\": \"abc\"\n }\n ],\n \"EksClusterId\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
889
+ "output": "{\n \"Response\": {\n \"Status\": \"abc\",\n \"Steps\": [\n {\n \"Step\": \"abc\",\n \"LifeState\": \"abc\",\n \"StartAt\": \"abc\",\n \"EndAt\": \"abc\",\n \"FailedMsg\": \"abc\"\n }\n ],\n \"EksClusterId\": \"abc\",\n \"SecurityGroupId\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
890
890
  "title": "获取2.0实例初始化任务状态"
891
891
  }
892
892
  ],
@@ -973,7 +973,7 @@
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\": \"1234\"\n}",
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
  }
@@ -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 doCreateEnvironmentRole(args, parsed_globals):
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.CreateEnvironmentRoleRequest()
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.CreateEnvironmentRole(model)
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
- "CreateEnvironmentRole": doCreateEnvironmentRole,
7522
+ "DescribeRocketMQTopicsByGroup": doDescribeRocketMQTopicsByGroup,
7364
7523
  "DescribeRocketMQTopics": doDescribeRocketMQTopics,
7365
7524
  "DescribeRocketMQClusters": doDescribeRocketMQClusters,
7366
7525
  "SendMessages": doSendMessages,
@@ -672,6 +672,13 @@
672
672
  "output": "DescribeRocketMQTopicMsgsResponse",
673
673
  "status": "online"
674
674
  },
675
+ "DescribeRocketMQTopicStats": {
676
+ "document": "获取Topic生产详情列表",
677
+ "input": "DescribeRocketMQTopicStatsRequest",
678
+ "name": "获取Topic生产详情列表",
679
+ "output": "DescribeRocketMQTopicStatsResponse",
680
+ "status": "online"
681
+ },
675
682
  "DescribeRocketMQTopics": {
676
683
  "document": "获取RocketMQ主题列表",
677
684
  "input": "DescribeRocketMQTopicsRequest",
@@ -679,6 +686,13 @@
679
686
  "output": "DescribeRocketMQTopicsResponse",
680
687
  "status": "online"
681
688
  },
689
+ "DescribeRocketMQTopicsByGroup": {
690
+ "document": "获取指定消费组下订阅的主题列表",
691
+ "input": "DescribeRocketMQTopicsByGroupRequest",
692
+ "name": "获取指定消费组下订阅的主题列表",
693
+ "output": "DescribeRocketMQTopicsByGroupResponse",
694
+ "status": "online"
695
+ },
682
696
  "DescribeRocketMQVipInstanceDetail": {
683
697
  "document": "获取单个RocketMQ专享集群信息",
684
698
  "input": "DescribeRocketMQVipInstanceDetailRequest",
@@ -840,6 +854,13 @@
840
854
  "output": "ModifyRocketMQGroupResponse",
841
855
  "status": "online"
842
856
  },
857
+ "ModifyRocketMQInstance": {
858
+ "document": "修改RocketMQ专享实例",
859
+ "input": "ModifyRocketMQInstanceRequest",
860
+ "name": "修改RocketMQ专享实例",
861
+ "output": "ModifyRocketMQInstanceResponse",
862
+ "status": "online"
863
+ },
843
864
  "ModifyRocketMQInstanceSpec": {
844
865
  "document": "本API用于修改RocketMQ专享实例配置,可以支持实例规格、节点数和存储的升配和实例规格的降配。本API发起订单并成功支付后进入实例配置变更的流程,可通过DescribeRocketMQVipInstances查询实例是否已变更完成。",
845
866
  "input": "ModifyRocketMQInstanceSpecRequest",
@@ -10517,6 +10538,144 @@
10517
10538
  ],
10518
10539
  "type": "object"
10519
10540
  },
10541
+ "DescribeRocketMQTopicStatsRequest": {
10542
+ "document": "DescribeRocketMQTopicStats请求参数结构体",
10543
+ "members": [
10544
+ {
10545
+ "disabled": false,
10546
+ "document": "实例ID",
10547
+ "example": "无",
10548
+ "member": "string",
10549
+ "name": "ClusterId",
10550
+ "required": true,
10551
+ "type": "string"
10552
+ },
10553
+ {
10554
+ "disabled": false,
10555
+ "document": "命名空间",
10556
+ "example": "无",
10557
+ "member": "string",
10558
+ "name": "NamespaceId",
10559
+ "required": true,
10560
+ "type": "string"
10561
+ },
10562
+ {
10563
+ "disabled": false,
10564
+ "document": "主题名",
10565
+ "example": "无",
10566
+ "member": "string",
10567
+ "name": "TopicName",
10568
+ "required": true,
10569
+ "type": "string"
10570
+ }
10571
+ ],
10572
+ "type": "object"
10573
+ },
10574
+ "DescribeRocketMQTopicStatsResponse": {
10575
+ "document": "DescribeRocketMQTopicStats返回参数结构体",
10576
+ "members": [
10577
+ {
10578
+ "disabled": false,
10579
+ "document": "生产详情列表",
10580
+ "example": "无",
10581
+ "member": "TopicStats",
10582
+ "name": "TopicStatsList",
10583
+ "output_required": false,
10584
+ "type": "list",
10585
+ "value_allowed_null": false
10586
+ },
10587
+ {
10588
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
10589
+ "member": "string",
10590
+ "name": "RequestId",
10591
+ "type": "string"
10592
+ }
10593
+ ],
10594
+ "type": "object"
10595
+ },
10596
+ "DescribeRocketMQTopicsByGroupRequest": {
10597
+ "document": "DescribeRocketMQTopicsByGroup请求参数结构体",
10598
+ "members": [
10599
+ {
10600
+ "disabled": false,
10601
+ "document": "集群ID",
10602
+ "example": "rocketmq-xxxxx",
10603
+ "member": "string",
10604
+ "name": "ClusterId",
10605
+ "required": true,
10606
+ "type": "string"
10607
+ },
10608
+ {
10609
+ "disabled": false,
10610
+ "document": "命名空间名称",
10611
+ "example": "prod",
10612
+ "member": "string",
10613
+ "name": "NamespaceId",
10614
+ "required": true,
10615
+ "type": "string"
10616
+ },
10617
+ {
10618
+ "disabled": false,
10619
+ "document": "消费组名称",
10620
+ "example": "test",
10621
+ "member": "string",
10622
+ "name": "GroupId",
10623
+ "required": true,
10624
+ "type": "string"
10625
+ },
10626
+ {
10627
+ "disabled": false,
10628
+ "document": "偏移量",
10629
+ "example": "0",
10630
+ "member": "uint64",
10631
+ "name": "Offset",
10632
+ "required": false,
10633
+ "type": "int"
10634
+ },
10635
+ {
10636
+ "disabled": false,
10637
+ "document": "限制条数",
10638
+ "example": "10",
10639
+ "member": "uint64",
10640
+ "name": "Limit",
10641
+ "required": false,
10642
+ "type": "int"
10643
+ }
10644
+ ],
10645
+ "type": "object"
10646
+ },
10647
+ "DescribeRocketMQTopicsByGroupResponse": {
10648
+ "document": "DescribeRocketMQTopicsByGroup返回参数结构体",
10649
+ "members": [
10650
+ {
10651
+ "disabled": false,
10652
+ "document": "总条数",
10653
+ "example": "100",
10654
+ "member": "uint64",
10655
+ "name": "TotalCount",
10656
+ "required": true,
10657
+ "type": "int",
10658
+ "value_allowed_null": false
10659
+ },
10660
+ {
10661
+ "disabled": false,
10662
+ "document": "主题列表",
10663
+ "example": "无",
10664
+ "member": "string",
10665
+ "name": "Topics",
10666
+ "required": true,
10667
+ "type": "list",
10668
+ "value_allowed_null": false
10669
+ },
10670
+ {
10671
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
10672
+ "member": "string",
10673
+ "name": "RequestId",
10674
+ "type": "string"
10675
+ }
10676
+ ],
10677
+ "type": "object"
10678
+ },
10520
10679
  "DescribeRocketMQTopicsRequest": {
10521
10680
  "document": "DescribeRocketMQTopics请求参数结构体",
10522
10681
  "members": [
@@ -13022,6 +13181,60 @@
13022
13181
  ],
13023
13182
  "type": "object"
13024
13183
  },
13184
+ "ModifyRocketMQInstanceRequest": {
13185
+ "document": "ModifyRocketMQInstance请求参数结构体",
13186
+ "members": [
13187
+ {
13188
+ "disabled": false,
13189
+ "document": "专享实例ID",
13190
+ "example": "rocketmq-xxxx",
13191
+ "member": "string",
13192
+ "name": "InstanceId",
13193
+ "required": true,
13194
+ "type": "string"
13195
+ },
13196
+ {
13197
+ "disabled": false,
13198
+ "document": "实例名称",
13199
+ "example": "test",
13200
+ "member": "string",
13201
+ "name": "Name",
13202
+ "required": false,
13203
+ "type": "string"
13204
+ },
13205
+ {
13206
+ "disabled": false,
13207
+ "document": "实例备注信息",
13208
+ "example": "test",
13209
+ "member": "string",
13210
+ "name": "Remark",
13211
+ "required": false,
13212
+ "type": "string"
13213
+ },
13214
+ {
13215
+ "disabled": false,
13216
+ "document": "实例消息保留时间,小时为单位",
13217
+ "example": "72",
13218
+ "member": "int64",
13219
+ "name": "MessageRetention",
13220
+ "required": false,
13221
+ "type": "int"
13222
+ }
13223
+ ],
13224
+ "type": "object"
13225
+ },
13226
+ "ModifyRocketMQInstanceResponse": {
13227
+ "document": "ModifyRocketMQInstance返回参数结构体",
13228
+ "members": [
13229
+ {
13230
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
13231
+ "member": "string",
13232
+ "name": "RequestId",
13233
+ "type": "string"
13234
+ }
13235
+ ],
13236
+ "type": "object"
13237
+ },
13025
13238
  "ModifyRocketMQInstanceSpecRequest": {
13026
13239
  "document": "ModifyRocketMQInstanceSpec请求参数结构体",
13027
13240
  "members": [
@@ -19293,6 +19506,72 @@
19293
19506
  ],
19294
19507
  "usage": "both"
19295
19508
  },
19509
+ "TopicStats": {
19510
+ "document": "Topic状态",
19511
+ "members": [
19512
+ {
19513
+ "disabled": false,
19514
+ "document": "所属Broker节点\n注意:此字段可能返回 null,表示取不到有效值。",
19515
+ "example": "无",
19516
+ "member": "string",
19517
+ "name": "BrokerName",
19518
+ "output_required": true,
19519
+ "type": "string",
19520
+ "value_allowed_null": true
19521
+ },
19522
+ {
19523
+ "disabled": false,
19524
+ "document": "队列编号\n注意:此字段可能返回 null,表示取不到有效值。",
19525
+ "example": "无",
19526
+ "member": "int64",
19527
+ "name": "QueueId",
19528
+ "output_required": true,
19529
+ "type": "int",
19530
+ "value_allowed_null": true
19531
+ },
19532
+ {
19533
+ "disabled": false,
19534
+ "document": "最小位点\n注意:此字段可能返回 null,表示取不到有效值。",
19535
+ "example": "无",
19536
+ "member": "int64",
19537
+ "name": "MinOffset",
19538
+ "output_required": true,
19539
+ "type": "int",
19540
+ "value_allowed_null": true
19541
+ },
19542
+ {
19543
+ "disabled": false,
19544
+ "document": "最大位点\n注意:此字段可能返回 null,表示取不到有效值。",
19545
+ "example": "无",
19546
+ "member": "int64",
19547
+ "name": "MaxOffset",
19548
+ "output_required": true,
19549
+ "type": "int",
19550
+ "value_allowed_null": true
19551
+ },
19552
+ {
19553
+ "disabled": false,
19554
+ "document": "消息条数\n注意:此字段可能返回 null,表示取不到有效值。",
19555
+ "example": "无",
19556
+ "member": "int64",
19557
+ "name": "MessageCount",
19558
+ "output_required": true,
19559
+ "type": "int",
19560
+ "value_allowed_null": true
19561
+ },
19562
+ {
19563
+ "disabled": false,
19564
+ "document": "消息最后写入时间\n注意:此字段可能返回 null,表示取不到有效值。",
19565
+ "example": "无",
19566
+ "member": "int64",
19567
+ "name": "LastUpdateTimestamp",
19568
+ "output_required": true,
19569
+ "type": "int",
19570
+ "value_allowed_null": true
19571
+ }
19572
+ ],
19573
+ "usage": "out"
19574
+ },
19296
19575
  "TraceResult": {
19297
19576
  "document": "消息轨迹结果",
19298
19577
  "members": [
@@ -798,6 +798,14 @@
798
798
  "title": "获取消息列表"
799
799
  }
800
800
  ],
801
+ "DescribeRocketMQTopicStats": [
802
+ {
803
+ "document": "",
804
+ "input": "POST / HTTP/1.1\nHost: tdmq.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeRocketMQTopicStats\n<公共请求参数>\n\n{\n \"ClusterId\": \"rocketmq-7j8m97bqpx5d\",\n \"NamespaceId\": \"sla_rop_namespace_504344\",\n \"TopicName\": \"topic-253348\"\n}",
805
+ "output": "{\n \"Response\": {\n \"RequestId\": \"5d5e666b-48d5-4abd-b628-fd2d15d0ee57\",\n \"TopicStatsList\": [\n {\n \"BrokerName\": \"rocketmq-7j8m97bqpx5d-1\",\n \"QueueId\": 0,\n \"MinOffset\": 0,\n \"MaxOffset\": 1,\n \"MessageCount\": 1,\n \"LastUpdateTimestamp\": 1695298841001\n }\n ]\n }\n}",
806
+ "title": "获取队列详情"
807
+ }
808
+ ],
801
809
  "DescribeRocketMQTopics": [
802
810
  {
803
811
  "document": "",
@@ -806,6 +814,14 @@
806
814
  "title": "获取主题列表"
807
815
  }
808
816
  ],
817
+ "DescribeRocketMQTopicsByGroup": [
818
+ {
819
+ "document": "",
820
+ "input": "https://tdmq.tencentcloudapi.com/?\nAction=DescribeRocketMQTopicsByGroup\n&ClusterId=rocketmq-2p9vx3ax9jxg\n&NamespaceId=example\n&GroupId=group-example\n&Offset=0\n&Limit=10\n&<公共请求参数>",
821
+ "output": "{\n \"Response\": {\n \"RequestId\": \"4668f537-44f3-4aca-bd78-fc26fb8d86ff\",\n \"TotalCount\": 1,\n \"Topics\": [\n \"topic-example\"\n ]\n }\n}",
822
+ "title": "获取指定消费组下订阅的主题列表"
823
+ }
824
+ ],
809
825
  "DescribeRocketMQVipInstanceDetail": [
810
826
  {
811
827
  "document": "",
@@ -996,6 +1012,14 @@
996
1012
  "title": "修改订阅组"
997
1013
  }
998
1014
  ],
1015
+ "ModifyRocketMQInstance": [
1016
+ {
1017
+ "document": "修改RocketMQ专享实例",
1018
+ "input": "POST / HTTP/1.1\nHost: tdmq.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyRocketMQInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"Name\": \"abc\",\n \"Remark\": \"abc\",\n \"MessageRetention\": 0\n}",
1019
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
1020
+ "title": "修改RocketMQ专享实例"
1021
+ }
1022
+ ],
999
1023
  "ModifyRocketMQInstanceSpec": [
1000
1024
  {
1001
1025
  "document": "对实例进行升降配",