Domain name for API request: tke.tencentcloudapi.com.
This API is used to query the billing information of running Pods. You can query a specific Pod by Namespace and Name or batch query by Pod Uid.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: DescribePodChargeInfo. |
Version | Yes | String | Common Params. The value used for this API: 2018-05-25. |
Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
ClusterId | Yes | String | Cluster ID |
Namespace | No | String | Namespace |
Name | No | String | Pod name |
Uids.N | No | Array of String | UID of the pod. |
Parameter Name | Type | Description |
---|---|---|
ChargeInfoSet | Array of PodChargeInfo | Pod billing information. |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to simultaneously specify Namespace and Name.
POST / HTTP/1.1
Host: tke.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribePodChargeInfo
<Common request parameters>
{
"ClusterId": "cls-s180xq54",
"Namespace": "default"
}
{
"Response": {
"Error": {
"Code": "InternalError.Param",
"Message": "Namespace and Name must be set"
},
"RequestId": "e9de622d-82fc-4aa1-a32c-f2679bc51a9e"
}
}
This example shows you how to simultaneously input Namespace and Name, or Uid.
POST / HTTP/1.1
Host: tke.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribePodChargeInfo
<Common request parameters>
{
"ClusterId": "cls-s180xq54"
}
{
"Response": {
"Error": {
"Code": "InternalError.Param",
"Message": "Namespace,Name,Uid is empty"
},
"RequestId": "99a94acb-7566-410b-8dc8-b611ca160820"
}
}
This example shows you how to simultaneously specify Namespace and Name.
POST / HTTP/1.1
Host: tke.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribePodChargeInfo
<Common request parameters>
{
"ClusterId": "cls-s180xq54",
"Namespace": "default",
"Name": "nginx-c4cd9685f-m58ts"
}
{
"Response": {
"ChargeInfoSet": [
{
"ChargeType": "POSTPAID_BY_HOUR",
"Cpu": 1,
"Memory": 1,
"Name": "nginx-c4cd9685f-m58ts",
"Namespace": "default",
"StartTime": "2024-03-26 00:10:38",
"Type": "intel",
"Uid": "4df5eb56-df50-4bd4-b84e-8c3f7fdf7ab8"
}
],
"RequestId": "9b400838-e679-486f-a7d3-854d5040a6e6"
}
}
This example shows you how to input multiple Uids for query.
POST / HTTP/1.1
Host: tke.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribePodChargeInfo
<Common request parameters>
{
"ClusterId": "cls-0x51a7qw",
"Uids": [
"6c4022b4-288c-449e-b50f-ae06d91dd48e",
"a49edc4a-b316-45b0-8ce4-8f23f93a27c7"
]
}
{
"Response": {
"ChargeInfoSet": [
{
"ChargeType": "POSTPAID_BY_HOUR",
"Cpu": 2,
"Memory": 4,
"Name": "csi-cbs-controller-6678658c57-hhbvw",
"Namespace": "kube-system",
"StartTime": "2024-04-17 00:08:15",
"Type": "intel",
"Uid": "6c4022b4-288c-449e-b50f-ae06d91dd48e"
},
{
"ChargeType": "NO_CHARGE",
"Cpu": 0.25,
"Memory": 0.5,
"Name": "coredns-56555dd999-ntc6g",
"Namespace": "kube-system",
"StartTime": "2024-04-17 00:08:11",
"Type": "intel",
"Uid": "a49edc4a-b316-45b0-8ce4-8f23f93a27c7"
}
],
"RequestId": "9fe5a6b6-ad87-426d-b619-b600d0a18f23"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
InternalError.Param | Parameter error. |
InternalError.UnexpectedInternal | Unknown internal error. |
本页内容是否解决了您的问题?