Consulta o resumo de consumo de todas as instâncias de produtos ou itens faturáveis de uma conta dentro de um ciclo de faturamento.
Descrição da operação
-
Os dados do mês atual são apenas para referência e podem ser ajustados durante o mês devido a faturamento atrasado, reembolsos, ajustes ou baixas de pagamentos em atraso. A fatura final fica disponível após as 12:00 do terceiro dia do mês seguinte.
-
Os dados da fatura do mês atual não incluem recursos pay-as-you-go que ainda não foram liquidados.
-
Você pode consultar dados dos últimos 18 meses.
-
Os dados da fatura são atualizados com um atraso de 24 horas em relação ao uso real. As informações relacionadas aos IDs das instâncias são atualizadas com um atraso de 48 horas. Isso inclui configurações de instância, tipos de instância, apelidos de instância, grupos de recursos, endereços IP públicos, endereços IP privados e zonas.
-
Os dados da fatura não fornecem custos para recursos anexados individuais de serviços como CDN, OSS e Internet Shared Bandwidth. Por exemplo, os custos não são fornecidos para nomes de domínio, buckets ou EIPs individuais. Para visualizar os custos dos recursos anexados, acesse a página Split Bill.
-
Para produtos do Alibaba Cloud Communications, você pode consultar os detalhes da fatura apenas a partir de junho de 2020. Para produtos HiChina, incluindo Domain Names e marcas registradas, você pode consultar os detalhes das faturas a partir de novembro de 2020.
-
Cada conta pode fazer até 10 consultas por segundo. Se ocorrer um erro de tempo limite, tente novamente.
Experimente agora
Testar
Autorização RAM
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| BillingCycle |
string |
Sim |
O ciclo de faturamento no formato AAAA-MM. Apenas os ciclos de faturamento dos últimos 18 meses são suportados. |
2020-03 |
| ProductCode |
string |
Não |
O código do produto. |
rds |
| ProductType |
string |
Não |
O tipo de produto. |
rds |
| SubscriptionType |
string |
Não |
O tipo de assinatura. Valores válidos:
|
PayAsYouGo |
| IsBillingItem |
boolean |
Não |
Especifica se os dados devem ser extraídos pela dimensão do item de faturamento.
|
false |
| NextToken |
string |
Não |
O token que especifica o ponto inicial para leitura de dados. Deixe este parâmetro vazio para ler a primeira página de resultados. Para ler a próxima página, defina este parâmetro com o valor NextToken que foi retornado na resposta anterior. Qualquer outro valor causará um erro. |
CAESEgoQCg4KCm |
| MaxResults |
integer |
Não |
O número máximo de registros de dados a serem retornados. Valor padrão: 20. Valor máximo: 300. |
20 |
| IsHideZeroCharge |
boolean |
Não |
Especifica se devem ser excluídas as faturas em que tanto PretaxGrossAmount quanto PretaxAmount são 0.
|
false |
| BillingDate |
string |
Não |
A data da fatura. Este parâmetro é obrigatório apenas quando Granularity está definido como DAILY. O formato é AAAA-MM-DD. Nota
O mês de BillingDate deve corresponder ao mês de BillingCycle. Por exemplo, se BillingCycle for 2020-03, BillingDate deve estar no formato 2020-03-DD. Se os meses não corresponderem, a consulta retornará resultados com base na configuração de BillingCycle. |
2020-03-02 |
| Granularity |
string |
Não |
A granularidade das faturas a serem consultadas. Valores válidos:
Nota
Especifique BillingDate se você selecionar DAILY. |
MONTHLY |
| BillOwnerId |
integer |
Não |
O ID da conta proprietária do recurso. Esta é a conta que realmente utiliza os recursos. |
122 |
| InstanceID |
string |
Não |
O ID da instância. |
abc |
| PipCode |
string |
Não |
O código do produto. Este é o mesmo código do produto na fatura no User Center. |
rds |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| Code |
string |
O código de status. |
Success |
| Message |
string |
A mensagem de erro. |
Successful! |
| RequestId |
string |
O ID da solicitação. |
79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
| Success |
boolean |
Indica se a solicitação foi bem-sucedida. |
true |
| Data |
object |
Os dados retornados. |
|
| NextToken |
string |
O token que marca a posição para a próxima consulta. Um valor vazio indica que todos os dados foram lidos. Para continuar a consulta, defina o parâmetro de solicitação NextToken com este valor na sua próxima chamada. |
CAESEgoQCg4KCm |
| BillingCycle |
string |
O ciclo de faturamento. Formato: AAAA-MM. |
2020-03 |
| MaxResults |
integer |
O número máximo de registros retornados por página. |
20 |
| AccountID |
string |
O ID da conta. |
122 |
| TotalCount |
integer |
O número total de registros. |
20 |
| AccountName |
string |
O nome da conta. |
test@test.aliyunid.com |
| Items |
array<object> |
Os detalhes da fatura. |
|
|
object |
|||
| BillingDate |
string |
The billing date is in YYYY-MM-DD format. This parameter has a value only when Granularity is set to DAILY. |
2020-03-20 |
| InstanceConfig |
string |
The detailed configuration of the instance. |
CPU:12 |
| InternetIP |
string |
The public IP address. |
34.xx.x.x |
| Item |
string |
The bill type:
|
PayAsYouGoBill |
| Tag |
string |
The tag of the resource. |
key:testKey value:testValue; key:testKey1 value:testValues1 |
| InstanceID |
string |
The instance ID. |
i-dadada |
| Currency |
string |
The currency. Valid values:
|
CNY |
| BillAccountName |
string |
The name of the account associated with the bill. |
test@test.aliyunid.com |
| SubscriptionType |
string |
The subscription type. Valid values:
|
PayAsYouGo |
| BizType |
string |
The service type. |
trusteeship |
| InstanceSpec |
string |
The instance type. |
ecs.sn1ne.3xlarge |
| DeductedByCoupons |
number |
The amount deducted by coupons. |
0.1 |
| BillingItem |
string |
The billing item. This property has a value only when IsBillingItem is true. |
带宽 |
| BillingItemCode |
string |
The billing item code. |
disk |
| Region |
string |
The region. |
杭州 |
| CostUnit |
string |
The cost center. |
未分配 |
| ListPriceUnit |
string |
The unit of the list price. This parameter is valid only when isBillingItem is true. |
元 |
| ResourceGroup |
string |
The resource group. |
默认资源组 |
| PipCode |
string |
The product code. It is the same as the product code on the bill in the User Center. |
rds |
| ServicePeriodUnit |
string |
The unit of the service period. |
秒 |
| PretaxAmount |
number |
The pretax amount. |
0.1 |
| CommodityCode |
string |
The product code. This is the same as the product detail code in the User Center. |
rds |
| ProductName |
string |
The name of the product. |
云数据库RDS |
| NickName |
string |
The nickname of the instance. |
test |
| ProductDetail |
string |
The details of the product. |
云数据库RDS |
| Usage |
string |
The usage. Nota
This parameter is valid only when isBillingItem is set to true. The usage data is the total usage from all bills in an epoch, not the actual purchased amount. For example, if you use 1 GB of storage and a bill is generated every hour, the hourly usage is 1 GB. The daily usage on the bill is 1 GB × 24 = 24 GB. |
100 |
| IntranetIP |
string |
The internal IP address. |
192.xx.xx.xx |
| OwnerID |
string |
The Account ID of the resource owner in a multi-account payment scenario. |
123 |
| UsageUnit |
string |
The usage unit. This parameter is valid only when isBillingItem is true. |
GB |
| BillAccountID |
string |
The ID of the account to which the bill belongs. |
122 |
| InvoiceDiscount |
number |
The discount amount. |
0.1 |
| DeductedByResourcePackage |
string |
The amount deducted by the resource plan. This parameter is valid only when isBillingItem is true. |
0.1 |
| ProductType |
string |
The product type. |
rds |
| ServicePeriod |
string |
The service period. |
3600 |
| Zone |
string |
The zone. |
杭州1 |
| ListPrice |
string |
The list price. This is valid only when isBillingItem is true. |
100 |
| PretaxGrossAmount |
number |
The original amount. |
0.1 |
| ProductCode |
string |
The product code. |
rds |
| BillingType |
string |
The billing method. |
其它 |
| ItemName |
string |
The name of the project. |
iZ28bycvyb4Z |
| AfterDiscountAmount |
number |
The amount after a discount is applied. This amount includes the payable amount after coupon deductions. The formula is: Discounted amount = List price - Discount amount. |
Exemplos
Resposta de sucesso
JSON formato
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F",
"Success": true,
"Data": {
"NextToken": "CAESEgoQCg4KCm",
"BillingCycle": "2020-03",
"MaxResults": 20,
"AccountID": "122",
"TotalCount": 20,
"AccountName": "test@test.aliyunid.com",
"Items": [
{
"BillingDate": "2020-03-20",
"InstanceConfig": "CPU:12",
"InternetIP": "34.xx.x.x\t",
"Item": "PayAsYouGoBill",
"Tag": "key:testKey value:testValue; key:testKey1 value:testValues1",
"InstanceID": "i-dadada",
"Currency": "CNY",
"BillAccountName": "test@test.aliyunid.com",
"SubscriptionType": "PayAsYouGo",
"BizType": "trusteeship",
"InstanceSpec": "ecs.sn1ne.3xlarge\t",
"DeductedByCoupons": 0.1,
"BillingItem": "带宽",
"BillingItemCode": "disk",
"Region": "杭州",
"CostUnit": "未分配\t",
"ListPriceUnit": "元",
"ResourceGroup": "默认资源组\t",
"PipCode": "rds",
"ServicePeriodUnit": "秒",
"PretaxAmount": 0.1,
"CommodityCode": "rds",
"ProductName": "云数据库RDS\t",
"NickName": "test",
"ProductDetail": "云数据库RDS\t",
"Usage": "100",
"IntranetIP": "192.xx.xx.xx",
"OwnerID": "123",
"UsageUnit": "GB",
"BillAccountID": "122",
"InvoiceDiscount": 0.1,
"DeductedByResourcePackage": "0.1",
"ProductType": "rds",
"ServicePeriod": "3600",
"Zone": "杭州1",
"ListPrice": "100",
"PretaxGrossAmount": 0.1,
"ProductCode": "rds",
"BillingType": "其它",
"ItemName": "iZ28bycvyb4Z",
"AfterDiscountAmount": 0
}
]
}
}
Códigos de erro
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.