You can call this operation to query the analysis period and generation status of the index analysis report on an ApsaraDB 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 must be enabled for the instance.
Note You can call CreateRecommendationTask to create online analysis tasks at any time point accurate to the hour within the last seven days. After the analysis is completed, the results are automatically converted to queriable data.

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 DescribeAvailableTimeRange

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

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
TimeRange

The time range in which the generation status of the index report is queried.

End time String 2019-03-12T16Z

Query end time, in the format of yyyy-MM-dd T HH z(UTC time).

NodeId String d-bpxxxxxxxx

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

Note This parameter is returned when the instance type is sharded cluster.
StartTime String 2019-03-11T16Z

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

Status String Success

The generation status of the index recommendation report.

  • Success
  • Creating
  • Failure: build failed.
TaskId String 3223xxxx

The ID of the restart task.

RequestId String 5C344679-EDD7-4BC1-964B-DDE01C507BE5

The ID of the request.

Examples

Sample requests


http(s)://mongodb.aliyuncs.com/? Action=DescribeAvailableTimeRange
&InstanceId=dds-bpxxxxxxxx
&<Common request parameters>

Sample success response

XML format

<DescribeAvailableTimeRangeResponse>
	  <TimeRange>
		    <TimeRange>
			      <Status>Success</Status>
			      <EndTime>2019-03-12T16Z</EndTime>
			      <TaskId>3223xxxx</TaskId>
			      <StartTime>2019-03-11T16Z</StartTime>
		    </TimeRange>
	  </TimeRange>
	  <RequestId>5C344679-EDD7-4BC1-964B-DDE01C507BE5</RequestId>
</DescribeAvailableTimeRangeResponse>

JSON format

{
	"TimeRange":{
		"TimeRange":[
			{
				"Status":"Success",
				"EndTime":"2019-03-12T16Z",
				"StartTime":"2019-03-11T16Z",
				"TaskId":"3223xxxx"
			}
		]
	},
	"RequestId":"5C344679-EDD7-4BC1-964B-DDE01C507BE5"
}

Error codes

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