Queries the coverage details of savings plans.

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 DescribeSavingsPlansCoverageDetail

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

PeriodType String Yes DAY

The time granularity at which coverage details are queried. Valid values: MONTH, DAY, and HOUR.

StartPeriod String Yes 2021-07-15 13:40:45

The beginning of the time range to query. The beginning is included in the time range. Specify the time in the format of yyyy-MM-dd HH:mm:ss.

EndPeriod String No 2021-08-09 00:00:00

The end of the time range to query. The end is excluded from the time range. If you do not set this parameter, the end time is the current time. Specify the time in the format of yyyy-MM-dd HH:mm:ss.

Token String No eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6MTB9

The token that is used to retrieve the next page of results. You do not need to set this parameter if you query coverage details within a specific time range for the first time. The response returns a token that you can use to query coverage details that are displayed on the next page. If a null value is returned for the NextToken parameter, no more coverage details can be queried.

MaxResults Integer No 300

The maximum number of entries to return. Default value: 20. Maximum value: 300.

BillOwnerId Long No 123745698925000

The ID of the account for which you want to query coverage details. If you do not set this parameter, the data of the current Alibaba Cloud account and its RAM users is queried. To query the data of a RAM user, specify the ID of the RAM user.

Response parameters

Parameter Type Example Description
Code String Success

The status code.

Data Struct

The return data.

Items Array of Item

The data entries.

CoveragePercentage Float 0.9

The coverage.

Currency String CNY

The currency.

DeductAmount Float 100

The deducted amount.

EndPeriod String 2021-05-05 15:00:00

The end time.

InstanceId String spn-a1fhs54c243hP22

The ID of the instance.

InstanceSpec String 7th_generation_X86_group

The specifications.

PostpaidCost Float 200

The pay-as-you-go cost.

Region String China (Hangzhou)

The region.

StartPeriod String 2021-05-05 14:00:00

The start time.

TotalAmount Float 100

The total expenditure.

UserId Long 2831685687844416

The ID of the account.

UserName String tester1@test.aliyun.com

The username of the account.

NextToken String eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6MTB9

The token of the next page.

TotalCount Integer 400

The total number of entries.

Message String Successful!

The message returned.

RequestId String 79EE7556-0CFD-44EB-9CD6-B3B526E3A85F

The ID of the request.

Success Boolean true

Indicates whether the operation was successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeSavingsPlansCoverageDetail
&PeriodType=DAY
&StartPeriod=2021-07-15 13:40:45
&<Common request parameters>

Sample success responses

JSON format

{"Message":"Successful!","RequestId":"79EE7556-0CFD-44EB-9CD6-B3B526E3A85F","Data":{"TotalCount":"400","NextToken":"eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6MTB9","Items":[{"PostpaidCost":"200","InstanceSpec":"7th_generation_X86_group","UserName":"tester1@test.aliyun.com","InstanceId":"spn-a1fhs54c243hP22","EndPeriod":"2021-05-05 15:00:00","UserId":"2831685687844416","Currency":"CNY","Region":"China (Hangzhou)","TotalAmount":"100","DeductAmount":"100","CoveragePercentage":"0.9","StartPeriod":"2021-05-05 14:00:00"}]},"Code":"Success","Success":"true"}

Error codes

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