调用DescribeDBProxyPerformance接口查询数据库代理的性能数据。
已调用ModifyDBProxy接口开通数据库代理。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeDBProxyPerformance |
系统规定参数。取值:DescribeDBProxyPerformance。 |
DBInstanceId | String | 是 | rm-t4n3axxxxx |
RDS实例ID。可调用DescribeDBInstances接口查询。 |
DBProxyInstanceType | String | 否 | DedicatedProxy |
代理服务类型。当前仅支持独享代理服务,取值:DedicatedProxy。 |
StartTime | String | 是 | 2019-09-19T01:00:00Z |
查询开始时间。格式:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 |
EndTime | String | 是 | 2019-09-21T18:00:00Z |
查询结束时间,不能早于查询开始时间。格式:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 |
RegionId | String | 是 | cn-hangzhou |
地域ID,可以通过接口DescribeRegions查看地域ID。 |
MetricsName | String | 是 | Maxscale_CpuUsage |
性能指标。 RDS MySQL仅支持Maxscale_CpuUsage:CPU使用率。 RDS PostgreSQL查询如下性能数据:
当查询多个性能数据时,可使用英文逗号(,)分隔,最多同时查询6个性能数据。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
EndTime | String | 2019-09-21T18:00:00Z |
查询结束时间。 |
StartTime | String | 2019-09-19T01:00:00Z |
查询开始时间。 |
DBInstanceId | String | lsmexxxxxxx |
监控实例的ID。 |
RequestId | String | DD31056F-A0CE-41D7-AD39-689B6ABAE982 |
请求ID。 |
PerformanceKeys | Array of PerformanceKey |
性能列表。 |
|
PerformanceKey | |||
ValueFormat | String | docker_container_cpu |
性能值的格式。 |
Key | String | cpu_ratio |
性能参数。 |
Values | Array of PerformanceValue |
数组格式:{value1, value2, …}。 |
|
PerformanceValue | |||
Date | String | 2019-10-10T09:00:00Z |
记录日期。格式:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 |
Value | String | 2.83 |
性能值。 |
示例
请求示例
http(s)://rds.aliyuncs.com/?Action=DescribeDBProxyPerformance
&RegionId=cn-hangzhou
&DBInstanceId=rm-t4n3axxxxx
&MetricsName=Maxscale_CpuUsage
&StartTime=2019-09-19T01:00:00Z
&EndTime=2019-09-21T18:00:00Z
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDBProxyPerformanceResponse>
<DBInstanceId>lsmexxxxxxx</DBInstanceId>
<RequestId>DD31056F-A0CE-41D7-AD39-689B6ABAE982</RequestId>
<PerformanceKeys>
<PerformanceKey>
<Values>
<PerformanceValue>
<Value>2.83</Value>
<Date>2019-10-10T09:00:00Z</Date>
</PerformanceValue>
</Values>
<Key>cpu_ratio</Key>
<ValueFormat>docker_container_cpu</ValueFormat>
</PerformanceKey>
</PerformanceKeys>
<EndTime>2019-10-10T09:39:28Z</EndTime>
<StartTime>2019-10-01T09:39:28Z</StartTime>
</DescribeDBProxyPerformanceResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"DBInstanceId" : "lsmexxxxxxx",
"RequestId" : "DD31056F-A0CE-41D7-AD39-689B6ABAE982",
"PerformanceKeys" : {
"PerformanceKey" : [ {
"Values" : {
"PerformanceValue" : [ {
"Value" : "2.83",
"Date" : "2019-10-10T09:00:00Z"
} ]
},
"Key" : "cpu_ratio",
"ValueFormat" : "docker_container_cpu"
} ]
},
"EndTime" : "2019-10-10T09:39:28Z",
"StartTime" : "2019-10-01T09:39:28Z"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidDBInstanceName.NotFound | The specified DB instance name does not exist. | 数据库实例名称不存在,请检查。 |
400 | InvalidDBInstanceName | Specified parameter DBInstanceName is not valid. | 指定的实例名称(DBInstanceName)无效,请检查参数值是否为null或空字符串。 |
404 | Endpoint.NotFound | Specified endpoint is not found. | 未找到指定独享代理连接地址的端口。 |
访问错误中心查看更多错误码。