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.
Note

  • 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.

Debugging

OpenAPI Explorer simplifies API usage. You can use OpenAPI Explorer to perform debugging operations, such as retrieve APIs, call APIs, and dynamically generate SDK example code.

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 that you want to query. The time is in the yyyy-MM-ddTHHZ format.

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

The end of the time range that you want to query. The value of EndTime must be later than the value of StartTime. The time is in the yyyy-MM-ddTHHZ format.

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 specified sharded cluster instance.

Note This parameter is only valid when you specify the DBInstanceId parameter to the ID of a sharded cluster instance.
AccessKeyId String No LTAIgbTGpxxxxxx

The AccessKey ID provided to you by Alibaba Cloud.

Response parameters

Parameter Type Example Description
RequestId String 009D2572-6839-43C0-8D89-44DB46CBA2EA

The ID of the request.

Examples

Sample requests


http(s)://mongodb.aliyuncs.com/? Action=CreateRecommendationTask
&StartTime=2019-01-01T12Z
&EndTime=2019-01-01T18Z
&InstanceId=dds-bpxxxxxxxx
&<Common request parameters>

Successful response examples

XML format

<CreateRecommendationTaskResponse>
  <RequestId>009D2572-6839-43C0-8D89-44DB46CBA2EA</RequestId>
</CreateRecommendationTaskResponse>

JSON format

{
	"RequestId":"009D2572-6839-43C0-8D89-44DB46CBA2EA"
}

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.

View error codes