调用ListParameters接口获取一个MongoDB实例下的参数描述列表。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|
Action | String | 是 | DescribeDBParameters | 系统规定参数,取值:DescribeDBParameters。 |
DBInstanceId | String | 是 | cb249298-8029-456a-xxxxxxxxxxxx | 实例ID。 |
AccessKeyId | String | 是 | 8hiE6GNfZFxxxxxxxxxxxx | 紫光云颁发给用户的访问服务所用的秘钥ID。 |
Signature | String | 是 | uC0wRWKW%2F8%2BFc%2xxxxxxxxxxxx | 紫光云颁发给用户的访问服务所用的签名ID。 |
返回参数 {#resultMapping .section}
名称 | 类型 | 示例值 | 描述 |
---|
RequestId | String | rm-uf6wjk5xxxxxxxxxx | 请求ID。 |
Result | |
| DescribeDBParameters的参数。 |
EngineVersion | String | 3.6 | 数据库版本号。3.6。 |
Engine | String | mongodb | 数据库类型。mysql、mongodb、redis。 |
Parameters |
|
| 参数列表。 |
└ParamName | String | net.compression.compressors | 参数名称。 |
└RestartRequired | Boolean | false | 修改参数值后是否需要重启实例。true:需要重启、false:不需要重启。 |
└ParameterDescription | String | 指定用于此实例mongod或mongos实例之间通信的默认压缩器 | 参数描述。 |
└AllowableValues | String | snappy|zlib|disabled | 参数允许范围。 |
└ParamValue | String | snappy | 参数运行值。 |
示例 {#demo .section}
请求示例
http(s)://api.unicloud.com/dbaas?Action=DescribeDBParameters
&DBInstanceId=0a9f6840-104c-4f2f-a169-9e58b2bxxxxxx
&AccessKeyId=8hiE6GNfZFxxxxxx
&Signature=b3EEENtVmEy%2FRpU1qpMdPxxxxxx
&
正常返回示例
{ "RequestId": "0f7711a7-bd51-4904-b7a9-0d2d863a597a", "Result": { "EngineVersion": "3.6", "Parameters": [
{ "ParamName": "net.compression.compressors", "ParameterDescription": "指定用于此实例mongod或mongos实例之间通信的默认压缩器", "RestartRequired": true, "ParamValue": "snappy", "AllowableValues": "snappy|zlib|disabled"
},
{ "ParamName": "operationProfiling.mode", "ParameterDescription": "改变分析日志输出级别", "RestartRequired": false, "ParamValue": "slowOp", "AllowableValues": "off|slowOp|all"
},
{ "ParamName": "operationProfiling.slowOpThresholdMs", "ParameterDescription": "指定慢查询时间", "RestartRequired": false, "ParamValue": "100", "AllowableValues": "[0-65536]"
},
{ "ParamName": "setParameter.cursorTimeoutMillis", "ParameterDescription": "MongoDB删除之前空闲游标的到期阈值", "RestartRequired": false, "ParamValue": "600000", "AllowableValues": "[1-2147483647]"
},
{ "ParamName": "setParameter.internalQueryExecMaxBlockingSortBytes", "ParameterDescription": "当前缓冲区值", "RestartRequired": false, "ParamValue": "33554432", "AllowableValues": "[33554432-268435456]"
}
], "Engine": "mongodb"
}
}
错误码 { .section}
HttpCode | 错误码 | 错误信息 | 描述 |
---|
400 | Param.RequiredFieldIsNull | The specified params is null who Required field. | 必填参数传入为空。 |
400 | InstancesUnavailable.InstanceNull | The instance is Unavailable, Please check the instance. | 根本实例不可用,请检查实例是否正确。 |
500 | Unknown.InnerException | Some Exception open in Inner. | 内部错误。 |