Queries the list of default parameter templates for ApsaraDB for MongoDB instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeParameterTemplates

The operation that you want to perform. Set the value to DescribeParameterTemplates.

RegionId String No cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

Engine String Yes mongodb

The database engine of the instance. Set the value to MongoDB.

EngineVersion String Yes 5.0

The database engine version of the instance. Valid values:

  • 5.0
  • 4.4
  • 4.2
  • 4.0
  • 3.4

Response parameters

Parameter Type Example Description
ParameterCount String 10

The number of parameters that are supported by the instance.

EngineVersion String 5.0

The database engine version of the instance.

Parameters Array of TemplateRecord

Details about the parameter templates.

TemplateRecord
CheckingCode String [0-65536]

The value range of modifiable parameters.

ParameterName String net.compression.compressors

The name of the parameter.

ParameterValue String 100

The default value of the parameter.

ForceModify Boolean true

Indicates whether the parameter is modifiable.

  • false: The parameter cannot be modified.
  • true: The parameter can be modified.
ForceRestart Boolean false

Indicates whether a restart is required for parameter modifications to take effect.

  • false: A restart is not required. Parameter modifications immediately take effect.
  • true: A restart is required for parameter modifications to take effect.
ParameterDescription String The threshold in milliseconds at which the database profiler considers a query slow, default is 100.

The description of the parameter.

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

The ID of the request.

Engine String mongodb

The database engine of the instance.

Examples

Sample requests

http(s)://mongodb.aliyuncs.com/?Action=DescribeParameterTemplates
&Engine=mongodb
&EngineVersion=5.0
&<Common request parameters>

Sample success responses

XML format

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>Specifies the thread and execution model used by mongod or 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>Specifies whether to enable GID for two-way synchronization.</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>Specifies whether to return an error during indexing when the index is longer than required.</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>The timeout period for transaction locking.</ParameterDescription>
        </TemplateRecord>
        <TemplateRecord>
            <ForceModify>true</ForceModify>
            <CheckingCode>[5-300]</CheckingCode>
            <ParameterValue>60</ParameterValue>
            <ForceRestart>false</ForceRestart>
            <ParameterName>setParameter.transactionLifetimeLimitSeconds</ParameterName>
            <ParameterDescription>The total timeout period for transactions.</ParameterDescription>
        </TemplateRecord>
    </Parameters>
    <RequestId>BDA54203-9D61-54A3-A568-D281F785****</RequestId>
    <Engine>mongodb</Engine>
</DescribeParameterTemplatesResponse>

JSON format

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" : "Specifies the thread and execution model used by mongod or 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" : "Specifies whether to enable GID for two-way synchronization."
    }, {
      "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" : "Specifies whether to return an error during indexing when the index is longer than required."
    }, {
      "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" : "The timeout period for transaction locking."
    }, {
      "ForceModify" : true,
      "CheckingCode" : "[5-300]",
      "ParameterValue" : "60",
      "ForceRestart" : false,
      "ParameterName" : "setParameter.transactionLifetimeLimitSeconds",
      "ParameterDescription" : "The total timeout period for transactions."
    } ]
  },
  "RequestId" : "BDA54203-9D61-54A3-A568-D281F785****",
  "Engine" : "mongodb"
}

Error codes

For a list of error codes, visit the API Error Center.