调用DescribeParameterTemplates接口查询MongoDB实例默认的参数模板列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeParameterTemplates

系统规定参数。取值:DescribeParameterTemplates

RegionId String cn-hangzhou

地域ID,您可以调用DescribeRegions查询。

Engine String mongodb

数据库引擎,取值:mongodb

EngineVersion String 5.0

数据库版本号。取值如下:

  • 5.0
  • 4.4
  • 4.2
  • 4.0
  • 3.4

返回数据

名称 类型 示例值 描述
ParameterCount String 10

参数个数。

EngineVersion String 5.0

数据库版本号。

Parameters Array of TemplateRecord

参数模板列表。

TemplateRecord
CheckingCode String [0-65536]

可修改参数的值。

ParameterName String net.compression.compressors

参数名称。

ParameterValue String 100

参数默认值。

ForceModify Boolean true

参数是否处于可修改的状态。

  • false:不可修改。
  • true:可修改。
ForceRestart Boolean false

修改参数后是否需要重启生效。

  • false:无需重启,提交后即生效。
  • true:需要重启生效。
ParameterDescription String The threshold in milliseconds at which the database profiler considers a query slow, default is 100.

参数描述。

RequestId String BDA54203-9D61-54A3-A568-D281F785****

请求ID。

Engine String mongodb

数据库引擎。

示例

请求示例

http(s)://mongodb.aliyuncs.com/?Action=DescribeParameterTemplates
&Engine=mongodb
&EngineVersion=5.0
&<公共请求参数>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeParameterTemplatesResponse>
    <ParameterCount>10</ParameterCount>
    <EngineVersion>5.0</EngineVersion>
    <Parameters>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>snappy|zlib|disabled</CheckingCode>
            <ParameterValue>snappy</ParameterValue>
            <ForceRestart>true</ForceRestart>
            <ParameterName>net.compression.compressors</ParameterName>
            <ParameterDescription/>
        </TemplateRecord>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>synchronous|adaptive</CheckingCode>
            <ParameterValue>synchronous</ParameterValue>
            <ForceRestart>true</ForceRestart>
            <ParameterName>net.serviceExecutor</ParameterName>
            <ParameterDescription>决定mongod或mongos使用的线程和执行模型</ParameterDescription>
        </TemplateRecord>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>off|slowOp|all</CheckingCode>
            <ParameterValue>off</ParameterValue>
            <ForceRestart>false</ForceRestart>
            <ParameterName>operationProfiling.mode</ParameterName>
            <ParameterDescription>The level of database profiling, which inserts information about operation performance into the system.profile collection. 'off' for no profiling, 'slowOp' for only includes slow operations, 'all' for includes all operations, default is 'slowOp'.</ParameterDescription>
        </TemplateRecord>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>[0-65536]</CheckingCode>
            <ParameterValue>100</ParameterValue>
            <ForceRestart>false</ForceRestart>
            <ParameterName>operationProfiling.slowOpThresholdMs</ParameterName>
            <ParameterDescription>The threshold in milliseconds at which the database profiler considers a query slow, default is 100.</ParameterDescription>
        </TemplateRecord>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>true|false</CheckingCode>
            <ParameterValue>false</ParameterValue>
            <ForceRestart>true</ForceRestart>
            <ParameterName>replication.oplogGlobalIdEnabled</ParameterName>
            <ParameterDescription>开启后启用 GID 支持双向同步</ParameterDescription>
        </TemplateRecord>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>[1-2147483647]</CheckingCode>
            <ParameterValue>600000</ParameterValue>
            <ForceRestart>false</ForceRestart>
            <ParameterName>setParameter.cursorTimeoutMillis</ParameterName>
            <ParameterDescription>The expiration threshold in milliseconds for idle cursors before MongoDB removes them; i.e. MongoDB removes cursors that have been idle for the specified cursorTimeoutMillis. default is 600000(i.e. 10 minutes)</ParameterDescription>
        </TemplateRecord>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>true|false</CheckingCode>
            <ParameterValue>false</ParameterValue>
            <ForceRestart>false</ForceRestart>
            <ParameterName>setParameter.failIndexKeyTooLong</ParameterName>
            <ParameterDescription>索引项过长,建索引时是否报错</ParameterDescription>
        </TemplateRecord>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>[33554432-268435456]</CheckingCode>
            <ParameterValue>33554432</ParameterValue>
            <ForceRestart>false</ForceRestart>
            <ParameterName>setParameter.internalQueryExecMaxBlockingSortBytes</ParameterName>
            <ParameterDescription>The maximum memory bytes that sort stage may use, default is 33554432(i.e. 32MB)</ParameterDescription>
        </TemplateRecord>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>[0-60]</CheckingCode>
            <ParameterValue>5</ParameterValue>
            <ForceRestart>false</ForceRestart>
            <ParameterName>setParameter.maxTransactionLockRequestTimeoutMillis</ParameterName>
            <ParameterDescription>事务加锁超时时间</ParameterDescription>
        </TemplateRecord>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>[5-300]</CheckingCode>
            <ParameterValue>60</ParameterValue>
            <ForceRestart>false</ForceRestart>
            <ParameterName>setParameter.transactionLifetimeLimitSeconds</ParameterName>
            <ParameterDescription>事务总超时时间</ParameterDescription>
        </TemplateRecord>
    </Parameters>
    <RequestId>BDA54203-9D61-54A3-A568-D281F785****</RequestId>
    <Engine>mongodb</Engine>
</DescribeParameterTemplatesResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "ParameterCount" : "10",
  "EngineVersion" : "5.0",
  "Parameters" : {
    "TemplateRecord" : [ {
      "ForceModify" : true,
      "CheckingCode" : "snappy|zlib|disabled",
      "ParameterValue" : "snappy",
      "ForceRestart" : true,
      "ParameterName" : "net.compression.compressors",
      "ParameterDescription" : ""
    }, {
      "ForceModify" : true,
      "CheckingCode" : "synchronous|adaptive",
      "ParameterValue" : "synchronous",
      "ForceRestart" : true,
      "ParameterName" : "net.serviceExecutor",
      "ParameterDescription" : "决定mongod或mongos使用的线程和执行模型"
    }, {
      "ForceModify" : true,
      "CheckingCode" : "off|slowOp|all",
      "ParameterValue" : "off",
      "ForceRestart" : false,
      "ParameterName" : "operationProfiling.mode",
      "ParameterDescription" : "The level of database profiling, which inserts information about operation performance into the system.profile collection. 'off' for no profiling, 'slowOp' for only includes slow operations, 'all' for includes all operations, default is 'slowOp'."
    }, {
      "ForceModify" : true,
      "CheckingCode" : "[0-65536]",
      "ParameterValue" : "100",
      "ForceRestart" : false,
      "ParameterName" : "operationProfiling.slowOpThresholdMs",
      "ParameterDescription" : "The threshold in milliseconds at which the database profiler considers a query slow, default is 100."
    }, {
      "ForceModify" : true,
      "CheckingCode" : "true|false",
      "ParameterValue" : "false",
      "ForceRestart" : true,
      "ParameterName" : "replication.oplogGlobalIdEnabled",
      "ParameterDescription" : "开启后启用 GID 支持双向同步"
    }, {
      "ForceModify" : true,
      "CheckingCode" : "[1-2147483647]",
      "ParameterValue" : "600000",
      "ForceRestart" : false,
      "ParameterName" : "setParameter.cursorTimeoutMillis",
      "ParameterDescription" : "The expiration threshold in milliseconds for idle cursors before MongoDB removes them; i.e. MongoDB removes cursors that have been idle for the specified cursorTimeoutMillis. default is 600000(i.e. 10 minutes)"
    }, {
      "ForceModify" : true,
      "CheckingCode" : "true|false",
      "ParameterValue" : "false",
      "ForceRestart" : false,
      "ParameterName" : "setParameter.failIndexKeyTooLong",
      "ParameterDescription" : "索引项过长,建索引时是否报错"
    }, {
      "ForceModify" : true,
      "CheckingCode" : "[33554432-268435456]",
      "ParameterValue" : "33554432",
      "ForceRestart" : false,
      "ParameterName" : "setParameter.internalQueryExecMaxBlockingSortBytes",
      "ParameterDescription" : "The maximum memory bytes that sort stage may use, default is 33554432(i.e. 32MB)"
    }, {
      "ForceModify" : true,
      "CheckingCode" : "[0-60]",
      "ParameterValue" : "5",
      "ForceRestart" : false,
      "ParameterName" : "setParameter.maxTransactionLockRequestTimeoutMillis",
      "ParameterDescription" : "事务加锁超时时间"
    }, {
      "ForceModify" : true,
      "CheckingCode" : "[5-300]",
      "ParameterValue" : "60",
      "ForceRestart" : false,
      "ParameterName" : "setParameter.transactionLifetimeLimitSeconds",
      "ParameterDescription" : "事务总超时时间"
    } ]
  },
  "RequestId" : "BDA54203-9D61-54A3-A568-D281F785****",
  "Engine" : "mongodb"
}

错误码

访问错误中心查看更多错误码。