更新时间:2022-08-16 GMT+08:00

查询DDM指定实例的参数详情

功能介绍

查询DDM指定实例的参数详情。

接口约束

无。

URI

GET /v3/{project_id}/instances/{instance_id}/configurations
表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

租户在某一region下的project ID。

instance_id

String

DDM实例ID。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Language

String

语种,默认中文。其中中文:zh-cn;英文:en-us。

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

updated

String

DDM当前实例参数最后更新时间。

configuration_parameter

Array of ConfigurationParameterList objects

DDM实例参数信息列表的集合。

表4 ConfigurationParameterList

参数

参数类型

描述

name

String

参数名称。

value

String

参数值。

need_restart

String

是否需要重启DDM实例。

read_only

String

参数是否只读。

value_range

String

参数取值范围。

data_type

String

参数数据类型。

description

String

参数描述。

状态码: 400

表5 响应Body参数

参数

参数类型

描述

errCode

String

业务错误码。

externalMessage

String

错误信息。

状态码: 500

表6 响应Body参数

参数

参数类型

描述

errCode

String

业务错误码。

externalMessage

String

错误信息。

请求示例

GET https://{endpoint}/v3/{project_id}/instances/{instance_id}/configurations

响应示例

状态码: 200

ok

{
    "updated": "2021-04-08 07:10:43",
    "configuration_parameter": [
        {
            "name": "bind_table",
            "value": "",
            "need_restart": "0",
            "readonly": "0",
            "value_range": null,
            "datatype": "string",
            "description": "用于描述多个拆分表的内在数据关联性,用于告知优化器在处理join时,把join下推到MySQL层执行。格式为:[{tb.col1,tb2.col2},{tb.col2,tb3.col1},...]。"
        },
        {
            "name": "character_set_server",
            "value": "gbk",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "gbk|utf8|utf8mb4",
            "datatype": "string",
            "description": "DDM服务端字符集,如果需要存储emoji表情符号,请选择utf8mb4,并设置RDS字符集也为utf8mb4。"
        },
        {
            "name": "collation_server",
            "value": "gbk_bin",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "utf8_unicode_ci|utf8_bin|gbk_chinese_ci|gbk_bin|utf8mb4_unicode_ci|utf8mb4_bin",
            "datatype": "string",
            "description": "DDM服务端字符序。"
        },
        {
            "name": "concurrent_execution_level",
            "value": "DATA_NODE",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "RDS_INSTANCE|DATA_NODE|PHY_TABLE",
            "datatype": "string",
            "description": "逻辑表扫描时的分片并发执行级别: DATA_NODE: 分库间并行扫描,同一分库内各分片串行扫描;RDS_INSTANCE: RDS实例间并行扫描,同一RDS实例内各分片串行扫描;PHY_TABLE: 各物理分片全部并行扫描。"
        },
        {
            "name": "connection_idle_timeout",
            "value": "28801",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "60-86400",
            "datatype": "integer",
            "description": "服务器关闭连接之前等待连接活动的秒数,以秒为单位,默认值28800,表示服务器关闭连接之前等待28800秒后,关闭连接。"
        },
        {
            "name": "enable_table_recycle",
            "value": "OFF",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "OFF|ON",
            "datatype": "boolean",
            "description": "是否开启表回收站。"
        },
        {
            "name": "insert_to_load_data",
            "value": "OFF",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "OFF|ON",
            "datatype": "boolean",
            "description": "insert 常量值使用load data执行。"
        },
        {
            "name": "live_transaction_timeout_on_shutdown",
            "value": "1",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "0-100",
            "datatype": "integer",
            "description": "在途事务等待时间窗口,以秒为单位,默认值为1,表示服务器关闭前端连接之前等待1秒后关闭连接。"
        },
        {
            "name": "long_query_time",
            "value": "1",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "0.01-10",
            "datatype": "float",
            "description": "记录慢查询的最小秒数,以秒为单位,默认值为1,表示如果sql执行大于等于1秒就定义为慢sql。"
        },
        {
            "name": "max_allowed_packet",
            "value": "16777216",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "1024-1073741824",
            "datatype": "integer",
            "description": "包或任何生成的中间字符串的最大值。包缓冲区初始化为net_buffer_length字节,但需要时可以增长到max_allowed_packet字节。该值默认很小,以捕获大的(可能是错误的)数据包。该值必须设置为1024的倍数。默认值为16777216。"
        },
        {
            "name": "max_backend_connections",
            "value": "0",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "0-10000000",
            "datatype": "integer",
            "description": "允许每个DDM节点同时连接RDS的最大客户端总数。0为默认值标识符,实际值等于(RDS的最大连接数-20)/DDM节点数。"
        },
        {
            "name": "max_connections",
            "value": "20000",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "10-40000",
            "datatype": "integer",
            "description": "允许同时连接的客户端总数。与后端RDS规格及数量有关。以个数为单位,默认值为20000,表示允许同时连接的客户端总数不能超过40000。"
        },
        {
            "name": "min_backend_connections",
            "value": "10",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "0-10000000",
            "datatype": "integer",
            "description": "允许每个DDM节点同时连接RDS的最小客户端总数。默认值为10。"
        },
        {
            "name": "not_from_pushdown",
            "value": "OFF",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "OFF|ON",
            "datatype": "boolean",
            "description": "是否强制下推查询语句中不含from的语句。"
        },
        {
            "name": "seconds_behind_master",
            "value": "30",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "0-7200",
            "datatype": "integer",
            "description": "主从rds节点延迟时间阈值,以秒为单位,默认值为30,表示主rds与从rds之间的数据同步时间值不能超过30秒,如果超过30s,读数据指令就不走当前读节点。"
        },
        {
            "name": "sql_audit",
            "value": "OFF",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "OFF|ON",
            "datatype": "boolean",
            "description": "开启或关闭SQL审计。"
        },
        {
            "name": "sql_execute_timeout",
            "value": "28800",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "100-28800",
            "datatype": "integer",
            "description": "SQL执行超时秒数,以秒为单位,默认值28800,表示sql执行大于等于28800秒超时。"
        },
        {
            "name": "support_ddl_binlog_hint",
            "value": "OFF",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "OFF|ON",
            "datatype": "boolean",
            "description": "DDL语句添加binlog hint。"
        },
        {
            "name": "transaction_policy",
            "value": "XA",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "XA|FREE|NO_DTX",
            "datatype": "string",
            "description": "XA:XA 事务,保证原子性,保证可见性;FREE:允许多写,不保证原子性,无性能损耗;NO_DTX:单分片事务。"
        },
        {
            "name": "ultimate_optimize",
            "value": "ON",
            "need_restart": "0",
            "readonly": "0",
            "value_range": "OFF|ON",
            "datatype": "boolean",
            "description": "关闭优化器中的极致下推优化功能。"
        }
    ]
}

状态码: 400

bad request

{
  "externalMessage" : "Parameter error.",
  "errCode" : "DBS.280001"
}

状态码: 500

server error

{
  "externalMessage" : "Parameter error.",
  "errCode" : "DBS.280001"
}

状态码

状态码

描述

200

OK

400

bad request

500

server error

错误码

请参见错误码