You can call this operation to modify the parameters of an AsparaDB for MongoDB instance.

The instance must be in the running state when you call this operation.

Note If some of the modified parameters take effect only after the instance is restarted, the instance is automatically restarted after the operation is complete. You can call the DescribeParameterTemplates operation to query the parameters that take effect only after the instance is restarted.

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 ModifyParameters

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

DBInstanceId String Yes dds-bpxxxxxxxx

The ID of the instance.

Note If you set this parameter to the ID of a sharded cluster instance, you must also specify the NodeId parameter.
Parameters String Yes {"operationProfiling.slowOpThresholdMs":"300"}

The parameters to be modified and their new values. Set this parameter to a JSON string. For example, set the parameter in the {"name":"value","name":"value2"} format.

Note You can call the DescribeParameterTemplates operation to query a list of default parameter templates.
NodeId String No d-bpxxxxxxxx

The ID of the mongos or shard in the specified sharded cluster instance.

Note This parameter is valid only if you set the DBInstanceId parameter to the ID of a sharded cluster instance.
CharacterType String No db

The role of the object that you want to query. Valid values:

  • db: a shard
  • cs: a config server
  • mongos: a mongos
  • logic: a sharded cluster instance

Response parameters

Parameter Type Example Description
RequestId String 36923CC2-DDAB-4B48-A144-DA92C1E19537

The ID of the request.

Examples

Sample requests

http(s)://mongodb.aliyuncs.com/? Action=ModifyParameters
&DBInstanceId=dds-bpxxxxxxxx
&Parameters={"operationProfiling.slowOpThresholdMs":"300"}
&<Common request parameters>

Sample success responses

XML format

<ModifyParametersResponse>
	  <RequestId>36923CC2-DDAB-4B48-A144-DA92C1E19537</RequestId>
</ModifyParametersResponse>

JSON format

{
	"RequestId": "36923CC2-DDAB-4B48-A144-DA92C1E19537"
}

Error codes

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