All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

DescribeBillDetail

Last updated:2021-07-19 20:49:09

DescribeBillDetail

You can call this operation to query the details about Pay-As-You-Go bills. Note: You can query only the bills of the same month.

Request parameters

Parameter Type Required Length (number of characters) Format Description
Action String Yes Fixed value The operation that you want to perform. Set the value to DescribeBillDetail.
Version String Yes Fixed value The version number of the API operation. Set the value to 2019-07-19.
BillStartTime String Yes yyyy-MM-dd HH:mm:ss The start time of the bill. This parameter is required. The query result contains this time.
BillEndTime String Yes yyyy-MM-dd HH:mm:ss The end time of the bill. This parameter is required. The query result does not contain this time. The bill end time must be in the same month as the bill start time.
ProductCode String Yes The code of the product. Example: KEC. This parameter is required. For more information about product codes, see DescribeProductCode.
SettleCycle Integer Yes The settlement cycle. Valid values:
3: hourly
4: daily
Page Integer No The number of the page to return. Default value: 1.
Size Integer No The number of entries to return on each page. Default value: 20. Valid values: 1 to 1000.


Response parameters

Parameter Type Description
RequestId String The ID of the request.
PageNum Integer The page number of the returned page.
PageSize Integer The number of entries returned per page.
TotalCount Integer The total number of entries.
DetailSet BillDetail array The bill details.


Error codes

Error code Error message HTTP status code Description
InvalidParameter There is one or more invalid parameter(%s). 400 The error message returned because the %s parameter is invalid. For more information about the parameter, see %s.
MissingParameter A required parameter for the specified action is not supplied. 400 The error message returned because the %s parameter is not specified. For more information about the parameter, see %s.


Successful call examples

Sample requests

http://krtpay.api.ksyun.com/?Action=DescribeBillDetail
&Version=2019-07-19
&BillStartTime=2019-07-12 20:00:00
&BillEndTime=2019-07-16 00:00:00
&ProductCode=VM_GROUP
&SettleCycle=3
&Common request parameters

Sample success responses

  • XML format
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <DescribeBillDetailsResponse>
        <RequestId>83f25946-1d4e-4300-b37e-97d7906188eb</RequestId>
        <PageNum>1</PageNum>
        <PageSize>1</PageSize>
        <TotalCount>76</TotalCount>
        <DetailSet>
            <Item>
                <AccountPeriod>2019071523</AccountPeriod>
                <CustomerId>2000074760</CustomerId>
                <InstanceId>fe080d31-ffbd-41bd-8056-09373c5c4f40</InstanceId>
                <InstanceName>testTag</InstanceName>
                <Project>278</Project>
                <ProjectName>hanziguoproject</ProjectName>
                <RegionName>CN East 1 (Shanghai)</RegionName>
                <RegionName>Availability zone B of CN East 1 (Shanghai)</RegionName>
                <ProductCode>VM_GROUP</ProductCode>
                <ProductGroupName>KEC</ProductGroupName>
                <ProductTypeName>Compute Optimized C1</ProductTypeName>
                <PayMode>87</PayMode>
                <PayModeName>Pay-As-You-Go</PayModeName>
                <PackageCode>C1.2A</PackageCode>
                <Duration>3600</Duration>
                <DurationAccumulate>3600</DurationAccumulate>
                <TimeUnitName>Seconds</TimeUnitName>
                <Cost>0.45220</Cost>
                <RealCost>0.45220</RealCost>
                <Discount>1.0000</Discount>
                <DetailBillStartTime>2019-07-15 23:00:00</DetailBillStartTime>
                <DetailBillEndTime>2019-07-16 00:00:00</DetailBillEndTime>
                <ServiceBillStartTime>2019-07-08 11:19:29</ServiceBillStartTime>
                <ConfigSet>
                    <ConfigItem>
                        <Key>Number of CPU cores</Key>
                        <code>cpu</code>
                        <Value>2</Value>
                    </ConfigItem>
                    <ConfigItem>
                        <Key>Memory size, in GB</Key>
                        <code>mem</code>
                        <Value>2</Value>
                    </ConfigItem>
                    <ConfigItem>
                        <Key>SSD (GB)</Key>
                        <code>ssd</code>
                        <Value>0</Value>
                    </ConfigItem>
                </ConfigSet>
                <ProviderSet>
                    <ProviderItem>
                        <Key>Operating system</Key>
                        <code>opstype</code>
                        <Value>linux</Value>
                    </ProviderItem>
                </ProviderSet>
                <ConsumeResources/>
                <ExtraSet>
                    <ExtraItem>
                        <Key>Private IP address</Key>
                        <Value>10.146.16.20</Value>
                    </ExtraItem>
                    <ExtraItem>
                        <Key>Public IP address</Key>
                        <Value></Value>
                    </ExtraItem>
                </ExtraSet>
                <TagSet>
                    <TagItem>
                        <Key>ssss</Key>
                        <Value>sss</Value>
                    </TagItem>
                </TagSet>
                <DisplaySet>
                    <DisplayItem>
                    <Key>KEC instance name</Key>
                        <Value>testTag</Value>
                    </DisplayItem>
                </DisplaySet>
            </Item>
        </DetailSet>
    </DescribeBillDetailsResponse>
  • JSON format
    {
        "RequestId": "fb4cf6b6-77a2-4e77-9f19-cffc7b860764",
        "PageNum": 1,
        "PageSize": 1,
        "TotalCount": 76,
        "DetailSet": [
            {
                "AccountPeriod": "2019071523",
                "CustomerId": 2000074760,
                "InstanceId": "fe080d31-ffbd-41bd-8056-09373c5c4f40",
                "InstanceName": "testTag",
                "Project": 278,
                "ProjectName": "hanziguoproject",
                "RegionName": "CN East 1 (Shanghai)",
                "ProductCode": "VM_GROUP",
                "ProductGroupName": "KEC",
                "ProductTypeName": "Compute Optimized C1",
                "PayModeName": "Pay-As-You-Go",
                "PackageCode": "C1.2A",
                "Duration": 3600,
                "DurationAccumulate": 3600,
                "TimeUnitName": "Seconds",
                "Cost": "0.45220",
                "RealCost": "0.45220",
                "Discount": 1,
                "DetailBillStartTime": "2019-07-15 23:00:00",
                "DetailBillEndTime": "2019-07-16 00:00:00",
                "ServiceBillStartTime": "2019-07-08 11:19:29",
                "ZoneName": "Availability zone B of CN East 1 (Shanghai)",
                "ConfigSet": [
                    {
                        "Key": "Number of CPU cores",
                    "Code": "cpu",
                        "Value": "2"
                    },
                    {
                        "Key": "Memory size, GB",
                        "Code": "mem",
                        "Value": "2"
                    },
                    {
                        "Key": "SSD (GB)",
                        "Code": "ssd",
                        "Value": "0"
                    }
                ],
                "ConsumeResources": [],
                "ExtraSet": [
                    {
                        "Key": "Private IP address",
                        "Value": "10.146.16.20"
                    },
                    {
                        "Key": "Public IP address",
                        "Value": ""
                    }
                ],
                "ProviderSet": [
                    {
                        "Key": "Operating system",
                        "Code": "opstype",
                        "Value": "linux"
                    }
                ],
                "TagSet": [
                    {
                        "Key": "ssss",
                        "Value": "sss"
                    }
                ],
                "DisplaySet": [
                    {
                        "Key": "Image",
                        "Value": "centos-7.5-20190509212611"
                    }
                ]
            }
        ]
    }
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback