You can call this operation to create index analysis tasks for an AsparaDB for MongoDB instance.

Ensure that the instance meets the following conditions when you call this operation:

  • The region of the instance is China (Hangzhou), China (Shanghai), China (Shenzhen), China (Qingdao), or China (Beijing).
  • The instance type is replica set or sharded cluster.
  • The log audit function is enabled for the instance.
  • After calling this operation to create index analysis tasks, you can call the DescribeAvailableTimeRange operation to query corresponding tasks and their statuses.
  • This API can be called up to 10 times each day.


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 CreateRecommendationTask

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

StartTime String Yes 2019-01-01T12Z

The beginning of the time range to query. The time is in the format of yyyy-MM-dd T HH z(UTC time).

Note The value of StartTime must be later than the time when the log audit function was enabled.
End time String Yes 2019-01-01T18Z

The end of the time range that you want to query. The time must be later than the start time. The time is in the format of yyyy-MM-dd T HH z(UTC time).

Note The maximum time range is 7 days.
InstanceId String Yes dds-bpxxxxxxxx

The ID of the instance.

Note If you specify this parameter to the ID of a sharded cluster instance, you must also specify the NodeId parameter.
NodeId String No d-bpxxxxxxxx

The ID of the shard in the sharded cluster instance.

Note This parameter is only valid when you specify the DBInstanceId parameter to the ID of a sharded cluster instance.
RegionId String No cn-hangzhou

The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID of the instance.

AccessKeyId String No LTAIgbTGpxxxxxx

The AccessKey ID that Alibaba Cloud provides for you to access services.

Response parameters

Prameter Type Sample response Description
RequestId String 009D2572-6839-43C0-8D89-44DB46CBA2EA

The ID of the request.


Sample requests

http(s):// Action=CreateRecommendationTask
&<Common request parameters>

Sample success response

XML format


JSON format


Error codes

Http status code Error code Error message Description
400 InvalidEndTime.Format Specified end time is not valid. The error message returned when the end time is invalid. Check the format of the specified time.

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