查询云数据库MySQL参数列表
# 1.接口描述
Action:DescribeDBParameter
描述: 获取云数据库MySQL参数列表
请求地址: cdsapi.capitalonline.net/mysql
请求方法: GET
# 2.请求参数
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| InstanceUuid | 是 | string | 实例编号 |
# 3.请求示例
def get_mysql_parameter_info():
"""
获取MySQL参数列表
"""
action = "DescribeDBParameter"
method = "GET"
param = {
"InstanceUuid": "********************"
}
url = get_signature(action, AK, AccessKeySecret, method, MYSQL_URL, param)
res = requests.get(url)
result = json.loads(res.content)
result = json.dumps(result) # json格式化
print(result)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# 4.返回参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| Message | string | 信息描述 |
| Code | string | 状态码 |
| Data | DataObj | 数据 |
# DataObj
| 参数名 | 类型 | 说明 |
|---|---|---|
| Parameters | list of ParametersObj | 参数信息 |
# ParametersObj
| 参数名 | 类型 | 说明 |
|---|---|---|
| DefaultValue | string | 参数默认值 |
| CurrentValue | string | 运行参数值 |
| Description | string | 参数描述 |
| IsModify | string | 是否可修改 |
| CheckingCode | string | 可修改参数值 |
| IsRestart | string | 是否重启 |
| Name | string | 参数名 |
# 5.返回示例
{
"Code": "Success",
"Data": {
"Parameters": [{
"CheckingCode": "[10-84]",
"CurrentValue": "84",
"DefaultValue": "84",
"Description": "Maximum length of words that are stored in an InnoDB FULLTEXT index.",
"IsModify": "true",
"IsRestart": "true",
"Name": "innodb_ft_max_token_size"
}]
},
"Message": "success"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15