Get Resource Attribute List - QueryMetricDataSummary
Overview
Get Resource Graph Attribute List
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is QueryMetricDataSummary . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | Yes |
ProductKey | string | ProductKey, SeeProduct Introduce | Yes |
Offset | int | Number of Skips | Yes |
Limit | int | Current Page Data Size | Yes |
Metrics.N | string | Specify the list of metrics to query, if not specified, the default set of metrics will be used. | No |
ResourceIds.N | string | Specify the list of resource IDs to query | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
TraceId | string | trace ID | No |
TotalCount | int | Total | No |
Data | QueryMetricDataSummaryRespData | Data | No |
Data Model
QueryMetricDataSummaryRespData
Field Name | Type | Description Information | Required |
---|---|---|---|
Total | int | Total | No |
List | array[ResourceSummary] | Result Set | No |
ResourceSummary
Field Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region | No |
Zone | string | Availability Zone | No |
ProjectId | int | Project ID | No |
CompanyId | int | Company ID | No |
ResourceId | string | Resource ID | No |
Name | string | Resource Name | No |
RegionCN | string | Region Chinese Name | No |
ZoneCN | string | Availability Zone | No |
ProductKey | string | Product Type | No |
OrganizationId | int | Project ID | No |
Status | int | Resource Status | No |
MonitorAttr | array[ResourceMonitorItem] | The current values of various metrics of the resource, type is: map[string][]MetricSingleSample The key of the map is the metric name, and the value is the array of sample points. | No |
ResourceMonitorItem
Field Name | Type | Description Information | Required |
---|---|---|---|
Metric | string | Metric Name | No |
MetricValues | array[MetricSingleSample] | Metric Data Array | No |
MetricSingleSample
Field Name | Type | Description Information | Required |
---|---|---|---|
Metric | string | Metric Name | No |
Tags | object | The k-v object of the metric’s tag | No |
Value | MetricSample | Single sample point object of the index | No |
MetricSample
Field Name | Type | Description Information | Required |
---|---|---|---|
Timestamp | int | timestamp | No |
Value | float | Sample Value | No |
Example
Request Example
https://api.surfercloud.com/?Action=QueryMetricDataSummary
&Region=cn-zj
&ProjectId=CXUBJRIx
&ProductKey=jRIQzjck
&Offset=9
&Limit=3
&Metrics.N=mZHSOGcV
&ResourceIds.N=gYnDoDyh
Response Example
{
"Action": "QueryMetricDataSummaryResponse",
"Data": {
"List": [
{
"CompanyId": 11,
"MonitorAttr": {
"cloudwatch_loadavg5m": [],
"cloudwatch_memory_actualused_space": [],
"uhost_cpu_used": [
{
"Metric": "uhost_cpu_used",
"Tags": {},
"Value": {
"Timestamp": 1755597442,
"Value": 3
}
}
],
"uhost_disk_read": [
{
"Metric": "uhost_disk_read",
"Tags": {},
"Value": {
"Timestamp": 1755597442,
"Value": 546
}
}
],
"uhost_net_in_flow": [
{
"Metric": "uhost_net_in_flow",
"Tags": {},
"Value": {
"Timestamp": 1755597442,
"Value": 13494
}
}
]
},
"Name": "测试主机",
"OrganizationId": 33,
"ProductKey": "uhost",
"ProjectId": 22,
"Region": "cn-wlcb",
"RegionCN": "乌兰察布",
"ResourceAttr": {},
"ResourceExtendAttr": {
"name": "测试主机",
"private_ip": "127.0.0.1",
"remark": "ttt",
"secondary_ip": "",
"tag": "Default",
"user_id": "151238458"
},
"ResourceId": "uhost-xxx",
"Status": 0,
"Zone": "cn-wlcb-01",
"ZoneCN": "乌兰察布可用区A"
}
],
"Total": 1
},
"RetCode": 0,
"TotalCount": 1,
"TraceId": "4f6b2a4a-fdfb-4e87-aa38-38dd71248c09"
}