tccli 3.0.1267.1__py2.py3-none-any.whl → 3.0.1269.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +5 -1
- tccli/services/aiart/aiart_client.py +106 -0
- tccli/services/aiart/v20221229/api.json +275 -0
- tccli/services/aiart/v20221229/examples.json +16 -0
- tccli/services/antiddos/v20200309/api.json +194 -136
- tccli/services/antiddos/v20200309/examples.json +15 -15
- tccli/services/bi/v20220105/api.json +1 -1
- tccli/services/billing/billing_client.py +4 -163
- tccli/services/billing/v20180709/api.json +0 -489
- tccli/services/billing/v20180709/examples.json +0 -24
- tccli/services/cat/v20180409/api.json +3 -1
- tccli/services/cbs/v20170312/api.json +27 -0
- tccli/services/ccc/v20200210/api.json +11 -11
- tccli/services/ccc/v20200210/examples.json +2 -2
- tccli/services/cdb/v20170320/api.json +48 -18
- tccli/services/cdn/v20180606/api.json +3 -0
- tccli/services/cfw/v20190904/api.json +30 -30
- tccli/services/ckafka/v20190819/api.json +10 -0
- tccli/services/cloudaudit/v20190319/api.json +3 -3
- tccli/services/cloudaudit/v20190319/examples.json +1 -1
- tccli/services/csip/v20221121/api.json +38 -38
- tccli/services/cwp/cwp_client.py +4 -57
- tccli/services/cwp/v20180228/api.json +11 -185
- tccli/services/cwp/v20180228/examples.json +0 -8
- tccli/services/cynosdb/v20190107/api.json +1 -1
- tccli/services/cynosdb/v20190107/examples.json +1 -1
- tccli/services/dcdb/dcdb_client.py +122 -16
- tccli/services/dcdb/v20180411/api.json +222 -0
- tccli/services/dcdb/v20180411/examples.json +16 -0
- tccli/services/dlc/v20210125/api.json +145 -26
- tccli/services/dlc/v20210125/examples.json +18 -18
- tccli/services/domain/v20180808/api.json +8 -8
- tccli/services/domain/v20180808/examples.json +3 -3
- tccli/services/es/v20180416/api.json +9 -9
- tccli/services/ess/v20201111/api.json +1 -1
- tccli/services/essbasic/v20210526/api.json +3 -3
- tccli/services/essbasic/v20210526/examples.json +2 -2
- tccli/services/facefusion/v20220927/api.json +4 -4
- tccli/services/faceid/v20180301/api.json +5 -5
- tccli/services/faceid/v20180301/examples.json +6 -0
- tccli/services/gme/v20180711/api.json +118 -115
- tccli/services/gme/v20180711/examples.json +6 -6
- tccli/services/hunyuan/v20230901/api.json +9 -0
- tccli/services/iotexplorer/v20190423/api.json +4 -4
- tccli/services/iotexplorer/v20190423/examples.json +5 -5
- tccli/services/keewidb/v20220308/api.json +2 -2
- tccli/services/lcic/lcic_client.py +61 -8
- tccli/services/lcic/v20220817/api.json +230 -177
- tccli/services/lcic/v20220817/examples.json +10 -2
- tccli/services/lighthouse/v20200324/api.json +80 -71
- tccli/services/live/v20180801/api.json +60 -4
- tccli/services/lke/v20231130/api.json +31 -0
- tccli/services/lkeap/v20240522/api.json +55 -9
- tccli/services/lkeap/v20240522/examples.json +1 -1
- tccli/services/mna/mna_client.py +106 -0
- tccli/services/mna/v20210119/api.json +246 -0
- tccli/services/mna/v20210119/examples.json +16 -0
- tccli/services/monitor/monitor_client.py +62 -57
- tccli/services/monitor/v20230616/api.json +266 -0
- tccli/services/monitor/v20230616/examples.json +19 -0
- tccli/services/mqtt/mqtt_client.py +489 -12
- tccli/services/mqtt/v20240516/api.json +864 -3
- tccli/services/mqtt/v20240516/examples.json +72 -0
- tccli/services/ocr/ocr_client.py +53 -0
- tccli/services/ocr/v20181119/api.json +287 -23
- tccli/services/ocr/v20181119/examples.json +8 -0
- tccli/services/postgres/postgres_client.py +334 -16
- tccli/services/postgres/v20170312/api.json +718 -35
- tccli/services/postgres/v20170312/examples.json +72 -0
- tccli/services/rum/v20210622/api.json +1 -1
- tccli/services/smh/v20210712/api.json +50 -30
- tccli/services/ssl/v20191205/api.json +496 -493
- tccli/services/ssl/v20191205/examples.json +144 -24
- tccli/services/taf/taf_client.py +0 -159
- tccli/services/taf/v20200210/api.json +0 -665
- tccli/services/taf/v20200210/examples.json +0 -24
- tccli/services/tdmq/v20200217/api.json +97 -0
- tccli/services/teo/v20220901/api.json +5 -5
- tccli/services/thpc/v20230321/api.json +19 -0
- tccli/services/tione/v20211111/api.json +14 -3
- tccli/services/trabbit/__init__.py +4 -0
- tccli/services/trabbit/trabbit_client.py +1691 -0
- tccli/services/trabbit/v20230418/api.json +4773 -0
- tccli/services/trabbit/v20230418/examples.json +237 -0
- tccli/services/trocket/v20230308/api.json +130 -11
- tccli/services/trtc/v20190722/api.json +8 -8
- tccli/services/trtc/v20190722/examples.json +2 -2
- tccli/services/vclm/v20240523/api.json +0 -450
- tccli/services/vclm/v20240523/examples.json +0 -48
- tccli/services/vclm/vclm_client.py +0 -159
- tccli/services/vpc/v20170312/api.json +46 -39
- tccli/services/vpc/v20170312/examples.json +3 -3
- tccli/services/wedata/v20210820/api.json +240 -42
- tccli/services/wedata/v20210820/examples.json +17 -3
- tccli/services/wedata/wedata_client.py +53 -0
- {tccli-3.0.1267.1.dist-info → tccli-3.0.1269.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1267.1.dist-info → tccli-3.0.1269.1.dist-info}/RECORD +101 -95
- {tccli-3.0.1267.1.dist-info → tccli-3.0.1269.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1267.1.dist-info → tccli-3.0.1269.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1267.1.dist-info → tccli-3.0.1269.1.dist-info}/license_files/LICENSE +0 -0
@@ -11,6 +11,8 @@ from tccli.exceptions import ConfigurationError, ClientError, ParamError
|
|
11
11
|
from tencentcloud.common import credential
|
12
12
|
from tencentcloud.common.profile.http_profile import HttpProfile
|
13
13
|
from tencentcloud.common.profile.client_profile import ClientProfile
|
14
|
+
from tencentcloud.monitor.v20230616 import monitor_client as monitor_client_v20230616
|
15
|
+
from tencentcloud.monitor.v20230616 import models as models_v20230616
|
14
16
|
from tencentcloud.monitor.v20180724 import monitor_client as monitor_client_v20180724
|
15
17
|
from tencentcloud.monitor.v20180724 import models as models_v20180724
|
16
18
|
|
@@ -2617,6 +2619,58 @@ def doGetPrometheusAgentManagementCommand(args, parsed_globals):
|
|
2617
2619
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2618
2620
|
|
2619
2621
|
|
2622
|
+
def doDescribePrometheusAgents(args, parsed_globals):
|
2623
|
+
g_param = parse_global_arg(parsed_globals)
|
2624
|
+
|
2625
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2626
|
+
cred = credential.CVMRoleCredential()
|
2627
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2628
|
+
cred = credential.STSAssumeRoleCredential(
|
2629
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2630
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2631
|
+
)
|
2632
|
+
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):
|
2633
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2634
|
+
else:
|
2635
|
+
cred = credential.Credential(
|
2636
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2637
|
+
)
|
2638
|
+
http_profile = HttpProfile(
|
2639
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2640
|
+
reqMethod="POST",
|
2641
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2642
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2643
|
+
)
|
2644
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2645
|
+
if g_param[OptionsDefine.Language]:
|
2646
|
+
profile.language = g_param[OptionsDefine.Language]
|
2647
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2648
|
+
client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
|
2649
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2650
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2651
|
+
model = models.DescribePrometheusAgentsRequest()
|
2652
|
+
model.from_json_string(json.dumps(args))
|
2653
|
+
start_time = time.time()
|
2654
|
+
while True:
|
2655
|
+
rsp = client.DescribePrometheusAgents(model)
|
2656
|
+
result = rsp.to_json_string()
|
2657
|
+
try:
|
2658
|
+
json_obj = json.loads(result)
|
2659
|
+
except TypeError as e:
|
2660
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2661
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2662
|
+
break
|
2663
|
+
cur_time = time.time()
|
2664
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2665
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2666
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2667
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2668
|
+
else:
|
2669
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2670
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2671
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2672
|
+
|
2673
|
+
|
2620
2674
|
def doUpdatePrometheusScrapeJob(args, parsed_globals):
|
2621
2675
|
g_param = parse_global_arg(parsed_globals)
|
2622
2676
|
|
@@ -6621,58 +6675,6 @@ def doCleanGrafanaInstance(args, parsed_globals):
|
|
6621
6675
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6622
6676
|
|
6623
6677
|
|
6624
|
-
def doGetMonitorData(args, parsed_globals):
|
6625
|
-
g_param = parse_global_arg(parsed_globals)
|
6626
|
-
|
6627
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6628
|
-
cred = credential.CVMRoleCredential()
|
6629
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6630
|
-
cred = credential.STSAssumeRoleCredential(
|
6631
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6632
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6633
|
-
)
|
6634
|
-
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):
|
6635
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6636
|
-
else:
|
6637
|
-
cred = credential.Credential(
|
6638
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6639
|
-
)
|
6640
|
-
http_profile = HttpProfile(
|
6641
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6642
|
-
reqMethod="POST",
|
6643
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
6644
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6645
|
-
)
|
6646
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6647
|
-
if g_param[OptionsDefine.Language]:
|
6648
|
-
profile.language = g_param[OptionsDefine.Language]
|
6649
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6650
|
-
client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
|
6651
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
6652
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6653
|
-
model = models.GetMonitorDataRequest()
|
6654
|
-
model.from_json_string(json.dumps(args))
|
6655
|
-
start_time = time.time()
|
6656
|
-
while True:
|
6657
|
-
rsp = client.GetMonitorData(model)
|
6658
|
-
result = rsp.to_json_string()
|
6659
|
-
try:
|
6660
|
-
json_obj = json.loads(result)
|
6661
|
-
except TypeError as e:
|
6662
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6663
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6664
|
-
break
|
6665
|
-
cur_time = time.time()
|
6666
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6667
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6668
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6669
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6670
|
-
else:
|
6671
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6672
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6673
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6674
|
-
|
6675
|
-
|
6676
6678
|
def doUninstallGrafanaDashboard(args, parsed_globals):
|
6677
6679
|
g_param = parse_global_arg(parsed_globals)
|
6678
6680
|
|
@@ -6933,7 +6935,7 @@ def doModifyAlarmPolicyTasks(args, parsed_globals):
|
|
6933
6935
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6934
6936
|
|
6935
6937
|
|
6936
|
-
def
|
6938
|
+
def doGetMonitorData(args, parsed_globals):
|
6937
6939
|
g_param = parse_global_arg(parsed_globals)
|
6938
6940
|
|
6939
6941
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -6962,11 +6964,11 @@ def doDescribePrometheusAgents(args, parsed_globals):
|
|
6962
6964
|
client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
|
6963
6965
|
client._sdkVersion += ("_CLI_" + __version__)
|
6964
6966
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6965
|
-
model = models.
|
6967
|
+
model = models.GetMonitorDataRequest()
|
6966
6968
|
model.from_json_string(json.dumps(args))
|
6967
6969
|
start_time = time.time()
|
6968
6970
|
while True:
|
6969
|
-
rsp = client.
|
6971
|
+
rsp = client.GetMonitorData(model)
|
6970
6972
|
result = rsp.to_json_string()
|
6971
6973
|
try:
|
6972
6974
|
json_obj = json.loads(result)
|
@@ -8234,11 +8236,13 @@ def doDescribeAlarmPolicy(args, parsed_globals):
|
|
8234
8236
|
|
8235
8237
|
|
8236
8238
|
CLIENT_MAP = {
|
8239
|
+
"v20230616": monitor_client_v20230616,
|
8237
8240
|
"v20180724": monitor_client_v20180724,
|
8238
8241
|
|
8239
8242
|
}
|
8240
8243
|
|
8241
8244
|
MODELS_MAP = {
|
8245
|
+
"v20230616": models_v20230616,
|
8242
8246
|
"v20180724": models_v20180724,
|
8243
8247
|
|
8244
8248
|
}
|
@@ -8294,6 +8298,7 @@ ACTION_MAP = {
|
|
8294
8298
|
"DescribePolicyConditionList": doDescribePolicyConditionList,
|
8295
8299
|
"ModifyAlarmPolicyCondition": doModifyAlarmPolicyCondition,
|
8296
8300
|
"GetPrometheusAgentManagementCommand": doGetPrometheusAgentManagementCommand,
|
8301
|
+
"DescribePrometheusAgents": doDescribePrometheusAgents,
|
8297
8302
|
"UpdatePrometheusScrapeJob": doUpdatePrometheusScrapeJob,
|
8298
8303
|
"DescribePrometheusInstanceInitStatus": doDescribePrometheusInstanceInitStatus,
|
8299
8304
|
"UpgradeGrafanaInstance": doUpgradeGrafanaInstance,
|
@@ -8371,13 +8376,12 @@ ACTION_MAP = {
|
|
8371
8376
|
"DeleteAlarmPolicy": doDeleteAlarmPolicy,
|
8372
8377
|
"CreatePrometheusAlertPolicy": doCreatePrometheusAlertPolicy,
|
8373
8378
|
"CleanGrafanaInstance": doCleanGrafanaInstance,
|
8374
|
-
"GetMonitorData": doGetMonitorData,
|
8375
8379
|
"UninstallGrafanaDashboard": doUninstallGrafanaDashboard,
|
8376
8380
|
"DescribePrometheusAlertPolicy": doDescribePrometheusAlertPolicy,
|
8377
8381
|
"SyncPrometheusTemp": doSyncPrometheusTemp,
|
8378
8382
|
"ModifyPrometheusInstanceAttributes": doModifyPrometheusInstanceAttributes,
|
8379
8383
|
"ModifyAlarmPolicyTasks": doModifyAlarmPolicyTasks,
|
8380
|
-
"
|
8384
|
+
"GetMonitorData": doGetMonitorData,
|
8381
8385
|
"UpdateDNSConfig": doUpdateDNSConfig,
|
8382
8386
|
"DescribeServiceDiscovery": doDescribeServiceDiscovery,
|
8383
8387
|
"RunPrometheusInstance": doRunPrometheusInstance,
|
@@ -8406,6 +8410,7 @@ ACTION_MAP = {
|
|
8406
8410
|
}
|
8407
8411
|
|
8408
8412
|
AVAILABLE_VERSION_LIST = [
|
8413
|
+
"v20230616",
|
8409
8414
|
"v20180724",
|
8410
8415
|
|
8411
8416
|
]
|
@@ -0,0 +1,266 @@
|
|
1
|
+
{
|
2
|
+
"actions": {
|
3
|
+
"GetMonitorData": {
|
4
|
+
"document": "获取云产品的监控数据。此接口不适用于拉取容器服务监控数据,如需拉取容器服务监控数据,请使用[根据维度条件查询监控数据](https://cloud.tencent.com/document/product/248/51845)接口。\n传入产品的命名空间、对象维度描述和监控指标即可获得相应的监控数据。\n接口调用限制:单请求最多可支持批量拉取10个实例的监控数据,单请求的数据点数限制为1440个。\n若您需要调用的指标、对象较多,可能存在因限频出现拉取失败的情况,建议尽量将请求按时间维度均摊。\n\n>?\n>- 2022年9月1日起,云监控开始对GetMonitorData接口计费。每个主账号每月可获得100万次免费请求额度,超过免费额度后如需继续调用接口需要开通 [API请求按量付费](https://buy.cloud.tencent.com/APIRequestBuy)。计费规则可查看[API计费文档](https://cloud.tencent.com/document/product/248/77914)。",
|
5
|
+
"input": "GetMonitorDataRequest",
|
6
|
+
"name": "拉取指标监控数据",
|
7
|
+
"output": "GetMonitorDataResponse",
|
8
|
+
"status": "online"
|
9
|
+
}
|
10
|
+
},
|
11
|
+
"metadata": {
|
12
|
+
"apiVersion": "2023-06-16",
|
13
|
+
"api_brief": "介绍如何使用API对腾讯云可观测平台进行操作,包括查询监控数据、创建报警规则等。",
|
14
|
+
"serviceNameCN": "腾讯云可观测平台",
|
15
|
+
"serviceShortName": "monitor"
|
16
|
+
},
|
17
|
+
"objects": {
|
18
|
+
"DataPoint": {
|
19
|
+
"document": "监控数据点",
|
20
|
+
"members": [
|
21
|
+
{
|
22
|
+
"disabled": false,
|
23
|
+
"document": "实例对象维度组合",
|
24
|
+
"example": "{\"Name\":\"instanceId\", \"Value\":\"ins-jiyyjnea\"}",
|
25
|
+
"member": "Dimension",
|
26
|
+
"name": "Dimensions",
|
27
|
+
"output_required": true,
|
28
|
+
"type": "list",
|
29
|
+
"value_allowed_null": false
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"disabled": false,
|
33
|
+
"document": "时间戳数组,表示那些时间点有数据,缺失的时间戳,没有数据点,可以理解为掉点了",
|
34
|
+
"example": "[1736784000, 1736784060]",
|
35
|
+
"member": "float",
|
36
|
+
"name": "Timestamps",
|
37
|
+
"output_required": true,
|
38
|
+
"type": "list",
|
39
|
+
"value_allowed_null": false
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"disabled": false,
|
43
|
+
"document": "监控值数组,该数组和Timestamps一一对应",
|
44
|
+
"example": "[10, 5.8, 7000.54]",
|
45
|
+
"member": "float",
|
46
|
+
"name": "Values",
|
47
|
+
"output_required": true,
|
48
|
+
"type": "list",
|
49
|
+
"value_allowed_null": false
|
50
|
+
}
|
51
|
+
],
|
52
|
+
"usage": "out"
|
53
|
+
},
|
54
|
+
"Dimension": {
|
55
|
+
"document": "实例对象的维度组合",
|
56
|
+
"members": [
|
57
|
+
{
|
58
|
+
"disabled": false,
|
59
|
+
"document": "实例维度名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
60
|
+
"example": "instanceId",
|
61
|
+
"member": "string",
|
62
|
+
"name": "Name",
|
63
|
+
"output_required": false,
|
64
|
+
"required": true,
|
65
|
+
"type": "string",
|
66
|
+
"value_allowed_null": true
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"disabled": false,
|
70
|
+
"document": "实例维度值\n注意:此字段可能返回 null,表示取不到有效值。",
|
71
|
+
"example": "ins-123",
|
72
|
+
"member": "string",
|
73
|
+
"name": "Value",
|
74
|
+
"output_required": false,
|
75
|
+
"required": true,
|
76
|
+
"type": "string",
|
77
|
+
"value_allowed_null": true
|
78
|
+
}
|
79
|
+
],
|
80
|
+
"usage": "both"
|
81
|
+
},
|
82
|
+
"Expr": {
|
83
|
+
"document": "计算算子",
|
84
|
+
"members": [
|
85
|
+
{
|
86
|
+
"disabled": false,
|
87
|
+
"document": "算子名称",
|
88
|
+
"example": "PERCENTILE",
|
89
|
+
"member": "string",
|
90
|
+
"name": "Function",
|
91
|
+
"required": false,
|
92
|
+
"type": "string"
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"disabled": false,
|
96
|
+
"document": "算子入参值",
|
97
|
+
"example": "99",
|
98
|
+
"member": "float",
|
99
|
+
"name": "N",
|
100
|
+
"required": false,
|
101
|
+
"type": "float"
|
102
|
+
}
|
103
|
+
],
|
104
|
+
"usage": "in"
|
105
|
+
},
|
106
|
+
"GetMonitorDataRequest": {
|
107
|
+
"document": "GetMonitorData请求参数结构体",
|
108
|
+
"members": [
|
109
|
+
{
|
110
|
+
"disabled": false,
|
111
|
+
"document": "命名空间,如QCE/CVM。各个云产品的详细命名空间说明请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档",
|
112
|
+
"example": "QCE/CVM",
|
113
|
+
"member": "string",
|
114
|
+
"name": "Namespace",
|
115
|
+
"required": true,
|
116
|
+
"type": "string"
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"disabled": false,
|
120
|
+
"document": "指标名称,如CPUUsage,仅支持单指标拉取。各个云产品的详细指标说明请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档,对应的指标英文名即为MetricName",
|
121
|
+
"example": "CPUUsage",
|
122
|
+
"member": "string",
|
123
|
+
"name": "MetricName",
|
124
|
+
"required": true,
|
125
|
+
"type": "string"
|
126
|
+
},
|
127
|
+
{
|
128
|
+
"disabled": false,
|
129
|
+
"document": "实例对象的维度组合,格式为key-value键值对形式的集合。不同类型的实例字段完全不同,如CVM为[{\"Name\":\"InstanceId\",\"Value\":\"ins-j0hk02zo\"}],Ckafka为[{\"Name\":\"instanceId\",\"Value\":\"ckafka-l49k54dd\"}],COS为[{\"Name\":\"appid\",\"Value\":\"1258344699\"},{\"Name\":\"bucket\",\"Value\":\"rig-1258344699\"}]。各个云产品的维度请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档,对应的维度列即为维度组合的key,value为key对应的值。单请求最多支持批量拉取10个实例的监控数据。",
|
130
|
+
"example": "无",
|
131
|
+
"member": "Instance",
|
132
|
+
"name": "Instances",
|
133
|
+
"required": true,
|
134
|
+
"type": "list"
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"disabled": false,
|
138
|
+
"document": "监控统计周期,如60。默认为取值为300,单位为s。每个指标支持的统计周期不一定相同,各个云产品支持的统计周期请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档,对应的统计周期列即为支持的统计周期。单请求的数据点数限制为1440个。",
|
139
|
+
"example": "300",
|
140
|
+
"member": "uint64",
|
141
|
+
"name": "Period",
|
142
|
+
"required": false,
|
143
|
+
"type": "int"
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"disabled": false,
|
147
|
+
"document": "起始时间,如2018-09-22T19:51:23+08:00",
|
148
|
+
"example": "2019-03-24T10:51:23+08:00",
|
149
|
+
"member": "datetime_iso",
|
150
|
+
"name": "StartTime",
|
151
|
+
"required": false,
|
152
|
+
"type": "string"
|
153
|
+
},
|
154
|
+
{
|
155
|
+
"disabled": false,
|
156
|
+
"document": "结束时间,如2018-09-22T20:51:23+08:00,默认为当前时间。 EndTime不能小于StartTime",
|
157
|
+
"example": "2019-03-24T20:51:23+08:00",
|
158
|
+
"member": "datetime_iso",
|
159
|
+
"name": "EndTime",
|
160
|
+
"required": false,
|
161
|
+
"type": "string"
|
162
|
+
},
|
163
|
+
{
|
164
|
+
"disabled": false,
|
165
|
+
"document": "计算算子",
|
166
|
+
"example": "{ \"Function\": \"PECENTILE\", \"N\": 99 }",
|
167
|
+
"member": "Expr",
|
168
|
+
"name": "Expr",
|
169
|
+
"required": false,
|
170
|
+
"type": "object"
|
171
|
+
}
|
172
|
+
],
|
173
|
+
"type": "object"
|
174
|
+
},
|
175
|
+
"GetMonitorDataResponse": {
|
176
|
+
"document": "GetMonitorData返回参数结构体",
|
177
|
+
"members": [
|
178
|
+
{
|
179
|
+
"disabled": false,
|
180
|
+
"document": "统计周期",
|
181
|
+
"example": "300",
|
182
|
+
"member": "uint64",
|
183
|
+
"name": "Period",
|
184
|
+
"output_required": true,
|
185
|
+
"type": "int",
|
186
|
+
"value_allowed_null": false
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"disabled": false,
|
190
|
+
"document": "指标名",
|
191
|
+
"example": "CPUUsage",
|
192
|
+
"member": "string",
|
193
|
+
"name": "MetricName",
|
194
|
+
"output_required": true,
|
195
|
+
"type": "string",
|
196
|
+
"value_allowed_null": false
|
197
|
+
},
|
198
|
+
{
|
199
|
+
"disabled": false,
|
200
|
+
"document": "数据点数组",
|
201
|
+
"example": "无",
|
202
|
+
"member": "DataPoint",
|
203
|
+
"name": "DataPoints",
|
204
|
+
"output_required": true,
|
205
|
+
"type": "list",
|
206
|
+
"value_allowed_null": false
|
207
|
+
},
|
208
|
+
{
|
209
|
+
"disabled": false,
|
210
|
+
"document": "开始时间",
|
211
|
+
"example": "2019-03-24T10:50:00+08:00",
|
212
|
+
"member": "datetime_iso",
|
213
|
+
"name": "StartTime",
|
214
|
+
"output_required": true,
|
215
|
+
"type": "string",
|
216
|
+
"value_allowed_null": false
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"disabled": false,
|
220
|
+
"document": "结束时间",
|
221
|
+
"example": "2019-03-24T20:50:00+08:00",
|
222
|
+
"member": "datetime_iso",
|
223
|
+
"name": "EndTime",
|
224
|
+
"output_required": true,
|
225
|
+
"type": "string",
|
226
|
+
"value_allowed_null": false
|
227
|
+
},
|
228
|
+
{
|
229
|
+
"disabled": false,
|
230
|
+
"document": "返回信息",
|
231
|
+
"example": "无",
|
232
|
+
"member": "string",
|
233
|
+
"name": "Msg",
|
234
|
+
"output_required": true,
|
235
|
+
"type": "string",
|
236
|
+
"value_allowed_null": false
|
237
|
+
},
|
238
|
+
{
|
239
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
240
|
+
"member": "string",
|
241
|
+
"name": "RequestId",
|
242
|
+
"type": "string"
|
243
|
+
}
|
244
|
+
],
|
245
|
+
"type": "object"
|
246
|
+
},
|
247
|
+
"Instance": {
|
248
|
+
"document": "实例维度组合数组",
|
249
|
+
"members": [
|
250
|
+
{
|
251
|
+
"disabled": false,
|
252
|
+
"document": "实例的维度组合\n注意:此字段可能返回 null,表示取不到有效值。",
|
253
|
+
"example": "无",
|
254
|
+
"member": "Dimension",
|
255
|
+
"name": "Dimensions",
|
256
|
+
"output_required": false,
|
257
|
+
"required": true,
|
258
|
+
"type": "list",
|
259
|
+
"value_allowed_null": true
|
260
|
+
}
|
261
|
+
],
|
262
|
+
"usage": "both"
|
263
|
+
}
|
264
|
+
},
|
265
|
+
"version": "1.0"
|
266
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"actions": {
|
3
|
+
"GetMonitorData": [
|
4
|
+
{
|
5
|
+
"document": "拉取某台云服务器某段时间内统计周期为5分钟的CPU利用率监控数据",
|
6
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetMonitorData\n<公共请求参数>\n\n{\n \"Namespace\": \"QCE/CVM\",\n \"MetricName\": \"CPUUsage\",\n \"Period\": 300,\n \"Instances\": [\n {\n \"Dimensions\": [\n {\n \"Name\": \"InstanceId\",\n \"Value\": \"ins-j0hk02zo\"\n }\n ]\n }\n ],\n \"StartTime\": \"2019-03-24T10:51:23+08:00\",\n \"EndTime\": \"2019-03-24T20:51:23+08:00\"\n}",
|
7
|
+
"output": "{\n \"Response\": {\n \"StartTime\": \"2019-03-24T10:50:00+08:00\",\n \"EndTime\": \"2019-03-24T20:50:00+08:00\",\n \"Period\": 300,\n \"MetricName\": \"CPUUsage\",\n \"DataPoints\": [\n {\n \"Dimensions\": [\n {\n \"Name\": \"InstanceId\",\n \"Value\": \"ins-j0hk02zo\"\n }\n ],\n \"Timestamps\": [\n 1535079000,\n 1535079300,\n 1535079600,\n 1535079900,\n 1535080200,\n 1535080500\n ],\n \"Values\": [\n 2.566,\n 2.283,\n 6.316,\n 2.816,\n 2.7,\n 2.35\n ]\n }\n ],\n \"Msg\": \"\",\n \"RequestId\": \"d96ec542-6547-4af2-91ac-fee85c1b8b85\"\n }\n}",
|
8
|
+
"title": "拉取单台云服务器监控数据"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"document": "",
|
12
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetMonitorData\n<公共请求参数>\n\n{\n \"Namespace\": \"QCE/BWP\",\n \"MetricName\": \"BWPResourceBandwidthOut\",\n \"Instances\": [\n {\n \"Dimensions\": [\n {\n \"Name\": \"bandwidthPackageId\",\n \"Value\": \"bwp-djhptxvq\"\n },\n {\n \"Name\": \"resourceId\",\n \"Value\": \"eip-abcd\"\n }\n ]\n }\n ],\n \"Expr\": {\n \"Function\": \"PERCENTILE\",\n \"N\": 99\n },\n \"Period\": 60,\n \"StartTime\": \"2024-12-11T10:57:27+08:00\",\n \"EndTime\": \"2024-12-11T11:07:27+08:00\"\n}",
|
13
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"34e19559-914f-4730-be56-6d53a13e9764\",\n \"Msg\": \"Success\",\n \"StartTime\": \"2024-12-11T10:57:27+08:00\",\n \"EndTime\": \"2024-12-11T11:07:27+08:00\",\n \"MetricName\": \"BWPResourceBandwidthOut\",\n \"Period\": 60,\n \"DataPoints\": [\n {\n \"Dimensions\": [\n {\n \"Name\": \"u_id\",\n \"Value\": \"eip-abcd\"\n },\n {\n \"Name\": \"netgroup\",\n \"Value\": \"bwp-djhptxvq\"\n }\n ],\n \"Timestamps\": [\n 1733886060\n ],\n \"Values\": [\n 12139179.200000001\n ]\n }\n ]\n }\n}",
|
14
|
+
"title": "获取带宽包P99数据"
|
15
|
+
}
|
16
|
+
]
|
17
|
+
},
|
18
|
+
"version": "1.0"
|
19
|
+
}
|