- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ViewBillingCommand
Returns all the domain-related billing records for the current Amazon Web Services account for a specified period
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { Route53DomainsClient, ViewBillingCommand } from "@aws-sdk/client-route-53-domains"; // ES Modules import
// const { Route53DomainsClient, ViewBillingCommand } = require("@aws-sdk/client-route-53-domains"); // CommonJS import
const client = new Route53DomainsClient(config);
const input = { // ViewBillingRequest
Start: new Date("TIMESTAMP"),
End: new Date("TIMESTAMP"),
Marker: "STRING_VALUE",
MaxItems: Number("int"),
};
const command = new ViewBillingCommand(input);
const response = await client.send(command);
// { // ViewBillingResponse
// NextPageMarker: "STRING_VALUE",
// BillingRecords: [ // BillingRecords
// { // BillingRecord
// DomainName: "STRING_VALUE",
// Operation: "REGISTER_DOMAIN" || "DELETE_DOMAIN" || "TRANSFER_IN_DOMAIN" || "UPDATE_DOMAIN_CONTACT" || "UPDATE_NAMESERVER" || "CHANGE_PRIVACY_PROTECTION" || "DOMAIN_LOCK" || "ENABLE_AUTORENEW" || "DISABLE_AUTORENEW" || "ADD_DNSSEC" || "REMOVE_DNSSEC" || "EXPIRE_DOMAIN" || "TRANSFER_OUT_DOMAIN" || "CHANGE_DOMAIN_OWNER" || "RENEW_DOMAIN" || "PUSH_DOMAIN" || "INTERNAL_TRANSFER_OUT_DOMAIN" || "INTERNAL_TRANSFER_IN_DOMAIN" || "RELEASE_TO_GANDI" || "TRANSFER_ON_RENEW" || "RESTORE_DOMAIN",
// InvoiceId: "STRING_VALUE",
// BillDate: new Date("TIMESTAMP"),
// Price: Number("double"),
// },
// ],
// };
ViewBillingCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
End | Date | undefined | The end date and time for the time period for which you want a list of billing records. Specify the date and time in Unix time format and Coordinated Universal time (UTC). |
Marker | string | undefined | For an initial request for a list of billing records, omit this element. If the number of billing records that are associated with the current Amazon Web Services account during the specified period is greater than the value that you specified for Constraints: The marker must match the value of |
MaxItems | number | undefined | The number of billing records to be returned. Default: 20 |
Start | Date | undefined | The beginning date and time for the time period for which you want a list of billing records. Specify the date and time in Unix time format and Coordinated Universal time (UTC). |
ViewBillingCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
BillingRecords | BillingRecord[] | undefined | A summary of billing records. |
NextPageMarker | string | undefined | If there are more billing records than you specified for |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidInput | client | The requested item is not acceptable. For example, for APIs that accept a domain name, the request might specify a domain name that doesn't belong to the account that submitted the request. For |
Route53DomainsServiceException | Base exception class for all service exceptions from Route53Domains service. |