AWS Billing 2023-09-07
- Client: Aws\Billing\BillingClient
- Service ID: billing
- Version: 2023-09-07
This page describes the parameters and results for the operations of the AWS Billing (2023-09-07), and shows how to use the Aws\Billing\BillingClient object to call the described operations. This documentation is specific to the 2023-09-07 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- ListBillingViews ( array $params = [] )
- Lists the billing views available for a given time period.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
Operations
ListBillingViews
$result = $client->listBillingViews
([/* ... */]); $promise = $client->listBillingViewsAsync
([/* ... */]);
Lists the billing views available for a given time period.
Every Amazon Web Services account has a unique PRIMARY
billing view that represents the billing data available by default. Accounts that use Billing Conductor also have BILLING_GROUP
billing views representing pro forma costs associated with each created billing group.
Parameter Syntax
$result = $client->listBillingViews([ 'activeTimeRange' => [ // REQUIRED 'activeAfterInclusive' => <integer || string || DateTime>, // REQUIRED 'activeBeforeInclusive' => <integer || string || DateTime>, // REQUIRED ], 'maxResults' => <integer>, 'nextToken' => '<string>', ]);
Parameter Details
Members
- activeTimeRange
-
- Required: Yes
- Type: ActiveTimeRange structure
The time range for the billing views listed.
PRIMARY
billing view is always listed.BILLING_GROUP
billing views are listed for time ranges when the associated billing group resource in Billing Conductor is active. The time range must be within one calendar month. - maxResults
-
- Type: int
The maximum number of billing views to retrieve. Default is 100.
- nextToken
-
- Type: string
The pagination token that is used on subsequent calls to list billing views.
Result Syntax
[ 'billingViews' => [ [ 'arn' => '<string>', 'billingViewType' => 'PRIMARY|BILLING_GROUP', 'name' => '<string>', 'ownerAccountId' => '<string>', ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- billingViews
-
- Required: Yes
- Type: Array of BillingViewListElement structures
A list of
BillingViewListElement
retrieved. - nextToken
-
- Type: string
The pagination token to use on subsequent calls to list billing views.
Errors
- ThrottlingException:
The request was denied due to request throttling.
- AccessDeniedException:
You don't have sufficient access to perform this action.
- ValidationException:
The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException:
The request processing failed because of an unknown error, exception, or failure.
Examples
Example 1: Invoke ListBillingViews
$result = $client->listBillingViews([ 'activeTimeRange' => [ 'activeAfterInclusive' =>, 'activeBeforeInclusive' => , ], ]);
Result syntax:
[ 'billingViews' => [ [ 'name' => 'Primary Billing View Account 123456789101', 'arn' => 'arn:aws:billing::123456789101:billingview/primary', 'billingViewType' => 'PRIMARY', 'ownerAccountId' => '123456789101', ], ], ]
Example 2: Error example for ListBillingViews
$result = $client->listBillingViews([ 'activeTimeRange' => [ 'activeAfterInclusive' =>, 'activeBeforeInclusive' => , ], ]);
Shapes
AccessDeniedException
Description
You don't have sufficient access to perform this action.
Members
- message
-
- Required: Yes
- Type: string
ActiveTimeRange
Description
A time range with a start and end time.
Members
- activeAfterInclusive
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The inclusive time range start date.
- activeBeforeInclusive
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The inclusive time range end date.
BillingViewListElement
Description
A representation of a billing view.
Members
- arn
-
- Type: string
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.
- billingViewType
-
- Type: string
The type of billing view.
- name
-
- Type: string
A list of names of the Billing view.
- ownerAccountId
-
- Type: string
The list of owners of the Billing view.
InternalServerException
Description
The request processing failed because of an unknown error, exception, or failure.
Members
- message
-
- Required: Yes
- Type: string
ThrottlingException
Description
The request was denied due to request throttling.
Members
- message
-
- Required: Yes
- Type: string
ValidationException
Description
The input fails to satisfy the constraints specified by an Amazon Web Services service.
Members
- fieldList
-
- Type: Array of ValidationExceptionField structures
The input fails to satisfy the constraints specified by an Amazon Web Services service.
- message
-
- Required: Yes
- Type: string
- reason
-
- Required: Yes
- Type: string
The input fails to satisfy the constraints specified by an Amazon Web Services service.
ValidationExceptionField
Description
The field's information of a request that resulted in an exception.
Members
- message
-
- Required: Yes
- Type: string
The message describing why the field failed validation.
- name
-
- Required: Yes
- Type: string
The name of the field.