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 */).
- AssociateSourceViews ( array $params = [] )
- Associates one or more source billing views with an existing billing view.
- CreateBillingView ( array $params = [] )
- Creates a billing view with the specified billing view attributes.
- DeleteBillingView ( array $params = [] )
- Deletes the specified billing view.
- DisassociateSourceViews ( array $params = [] )
- Removes the association between one or more source billing views and an existing billing view.
- GetBillingPreferences ( array $params = [] )
- Retrieves billing preferences for the specified feature.
- GetBillingView ( array $params = [] )
- Returns the metadata associated to the specified billing view ARN.
- GetCreditAllocationHistory ( array $params = [] )
- Returns the per-billing-month allocation history for credits applied to an Amazon Web Services account's bills.
- GetCredits ( array $params = [] )
- Returns the list of Amazon Web Services account credits for the specified account.
- GetResourcePolicy ( array $params = [] )
- Returns the resource-based policy document attached to the resource in JSON format.
- ListBillingViews ( array $params = [] )
- Lists the billing views available for a given time period.
- ListSourceViewsForBillingView ( array $params = [] )
- Lists the source views (managed Amazon Web Services billing views) associated with the billing view.
- ListTagsForResource ( array $params = [] )
- Lists tags associated with the billing view resource.
- RedeemCredits ( array $params = [] )
- Redeems an Amazon Web Services promotional credit code on behalf of the calling account.
- TagResource ( array $params = [] )
- An API operation for adding one or more tags (key-value pairs) to a resource.
- UntagResource ( array $params = [] )
- Removes one or more tags from a resource.
- UpdateBillingPreferences ( array $params = [] )
- Updates billing preferences for the specified feature.
- UpdateBillingView ( array $params = [] )
- An API to update the attributes of the billing view.
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
AssociateSourceViews
$result = $client->associateSourceViews([/* ... */]); $promise = $client->associateSourceViewsAsync([/* ... */]);
Associates one or more source billing views with an existing billing view. This allows creating aggregate billing views that combine data from multiple sources.
Parameter Syntax
$result = $client->associateSourceViews([
'arn' => '<string>', // REQUIRED
'sourceViews' => ['<string>', ...], // REQUIRED
]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the billing view to associate source views with.
- sourceViews
-
- Required: Yes
- Type: Array of strings
A list of ARNs of the source billing views to associate.
Result Syntax
[
'arn' => '<string>',
]
Result Details
Members
- arn
-
- Required: Yes
- Type: string
The ARN of the billing view that the source views were associated with.
Errors
- BillingViewHealthStatusException:
Exception thrown when a billing view's health status prevents an operation from being performed. This may occur if the billing view is in a state other than
HEALTHY.- ServiceQuotaExceededException:
You've reached the limit of resources you can create, or exceeded the size of an individual resource.
- ThrottlingException:
The request was denied due to request throttling.
- ResourceNotFoundException:
The specified ARN in the request doesn't exist.
- AccessDeniedException:
You don't have sufficient access to perform this action.
- ConflictException:
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
- 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 AssociateSourceViews
$result = $client->associateSourceViews([
'arn' => 'arn:aws:billing::123456789012:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
'sourceViews' => [
'arn:aws:billing::123456789012:billingview/primary',
'arn:aws:billing::123456789012:billingview/custom-d3f9c7e4-8b2f-4a6e-9d3b-2f7c8a1e5f6d',
],
]);
Result syntax:
[
'arn' => 'arn:aws:billing::123456789012:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
]
CreateBillingView
$result = $client->createBillingView([/* ... */]); $promise = $client->createBillingViewAsync([/* ... */]);
Creates a billing view with the specified billing view attributes.
Parameter Syntax
$result = $client->createBillingView([
'clientToken' => '<string>',
'dataFilterExpression' => [
'costCategories' => [
'key' => '<string>', // REQUIRED
'values' => ['<string>', ...], // REQUIRED
],
'dimensions' => [
'key' => 'LINKED_ACCOUNT', // REQUIRED
'values' => ['<string>', ...], // REQUIRED
],
'tags' => [
'key' => '<string>', // REQUIRED
'values' => ['<string>', ...], // REQUIRED
],
'timeRange' => [
'beginDateInclusive' => <integer || string || DateTime>,
'endDateInclusive' => <integer || string || DateTime>,
],
],
'description' => '<string>',
'name' => '<string>', // REQUIRED
'resourceTags' => [
[
'key' => '<string>', // REQUIRED
'value' => '<string>',
],
// ...
],
'sourceViews' => ['<string>', ...], // REQUIRED
]);
Parameter Details
Members
- clientToken
-
- Type: string
A unique, case-sensitive identifier you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. If the original request completes successfully, any subsequent retries complete successfully without performing any further actions with an idempotent request.
- dataFilterExpression
-
- Type: Expression structure
See Expression. Billing view only supports
LINKED_ACCOUNT,Tags, andCostCategories. - description
-
- Type: string
The description of the billing view.
- name
-
- Required: Yes
- Type: string
The name of the billing view.
- resourceTags
-
- Type: Array of ResourceTag structures
A list of key value map specifying tags associated to the billing view being created.
- sourceViews
-
- Required: Yes
- Type: Array of strings
A list of billing views used as the data source for the custom billing view.
Result Syntax
[
'arn' => '<string>',
'createdAt' => <DateTime>,
]
Result Details
Members
- arn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.
- createdAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the billing view was created.
Errors
- BillingViewHealthStatusException:
Exception thrown when a billing view's health status prevents an operation from being performed. This may occur if the billing view is in a state other than
HEALTHY.- ServiceQuotaExceededException:
You've reached the limit of resources you can create, or exceeded the size of an individual resource.
- ThrottlingException:
The request was denied due to request throttling.
- ResourceNotFoundException:
The specified ARN in the request doesn't exist.
- AccessDeniedException:
You don't have sufficient access to perform this action.
- ConflictException:
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
- 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 CreateBillingView
$result = $client->createBillingView([
'name' => 'Example Custom Billing View',
'dataFilterExpression' => [
'dimensions' => [
'key' => 'LINKED_ACCOUNT',
'values' => [
'000000000000',
],
],
],
'description' => 'Custom Billing View Example',
'sourceViews' => [
'arn:aws:billing::123456789101:billingview/primary',
],
]);
Result syntax:
[
'arn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
'createdAt' => ,
]
DeleteBillingView
$result = $client->deleteBillingView([/* ... */]); $promise = $client->deleteBillingViewAsync([/* ... */]);
Deletes the specified billing view.
Parameter Syntax
$result = $client->deleteBillingView([
'arn' => '<string>', // REQUIRED
'force' => true || false,
]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.
- force
-
- Type: boolean
If set to true, forces deletion of the billing view even if it has derived resources (e.g. other billing views or budgets). Use with caution as this may break dependent resources.
Result Syntax
[
'arn' => '<string>',
]
Result Details
Members
- arn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.
Errors
- ThrottlingException:
The request was denied due to request throttling.
- AccessDeniedException:
You don't have sufficient access to perform this action.
- ConflictException:
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
- 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 DeleteBillingView
$result = $client->deleteBillingView([
'arn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
]);
Result syntax:
[
'arn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
]
DisassociateSourceViews
$result = $client->disassociateSourceViews([/* ... */]); $promise = $client->disassociateSourceViewsAsync([/* ... */]);
Removes the association between one or more source billing views and an existing billing view. This allows modifying the composition of aggregate billing views.
Parameter Syntax
$result = $client->disassociateSourceViews([
'arn' => '<string>', // REQUIRED
'sourceViews' => ['<string>', ...], // REQUIRED
]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the billing view to disassociate source views from.
- sourceViews
-
- Required: Yes
- Type: Array of strings
A list of ARNs of the source billing views to disassociate.
Result Syntax
[
'arn' => '<string>',
]
Result Details
Members
- arn
-
- Required: Yes
- Type: string
The ARN of the billing view that the source views were disassociated from.
Errors
- BillingViewHealthStatusException:
Exception thrown when a billing view's health status prevents an operation from being performed. This may occur if the billing view is in a state other than
HEALTHY.- ThrottlingException:
The request was denied due to request throttling.
- ResourceNotFoundException:
The specified ARN in the request doesn't exist.
- AccessDeniedException:
You don't have sufficient access to perform this action.
- ConflictException:
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
- 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 DisassociateSourceViews
$result = $client->disassociateSourceViews([
'arn' => 'arn:aws:billing::123456789012:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
'sourceViews' => [
'arn:aws:billing::123456789012:billingview/primary',
'arn:aws:billing::123456789012:billingview/custom-d3f9c7e4-8b2f-4a6e-9d3b-2f7c8a1e5f6d',
],
]);
Result syntax:
[
'arn' => 'arn:aws:billing::123456789012:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
]
GetBillingPreferences
$result = $client->getBillingPreferences([/* ... */]); $promise = $client->getBillingPreferencesAsync([/* ... */]);
Retrieves billing preferences for the specified feature. Each feature controls a distinct billing capability: which accounts can share Reserved Instances or credits, whether billing alerts are enabled, the historical record of sharing changes, and per-credit options.
Parameter Syntax
$result = $client->getBillingPreferences([
'features' => ['<string>', ...], // REQUIRED
'filters' => [
[
'name' => 'PREFERENCE_KEY',
'value' => ['<string>', ...],
],
// ...
],
'maxResults' => <integer>,
'nextToken' => '<string>',
]);
Parameter Details
Members
- features
-
- Required: Yes
- Type: Array of strings
The feature to retrieve. Specify exactly one value. Valid values:
BILLING_ALERTS,RI_SHARING,RI_SHARING_HISTORY,CREDIT_SHARING,CREDIT_SHARING_HISTORY,CREDIT_LEVEL_SHARING,CREDIT_PREFERENCE_OPTIONS. - filters
-
- Type: Array of BillingFeatureFilter structures
Filters to narrow results. Specify exactly one filter when supplied. The supported filter name is
PREFERENCE_KEY, which accepts 1 to 10 values to match preference keys. - maxResults
-
- Type: int
The maximum number of records to return per page. Range: 1 to 50. Default: 50.
- nextToken
-
- Type: string
Pagination token from a previous response. Pass the value returned in
nextTokento retrieve the next page of results.
Result Syntax
[
'billingPreferences' => [
[
'accountId' => '<string>',
'accountName' => '<string>',
'billingPeriod' => [
'month' => <integer>,
'year' => <integer>,
],
'feature' => 'RI_SHARING|RI_SHARING_HISTORY|CREDIT_SHARING|CREDIT_SHARING_HISTORY|CREDIT_LEVEL_SHARING|BILLING_ALERTS|CREDIT_PREFERENCE_OPTIONS',
'key' => '<string>',
'value' => 'ENABLED|DISABLED',
],
// ...
],
'nextToken' => '<string>',
]
Result Details
Members
- billingPreferences
-
- Required: Yes
- Type: Array of BillingPreferenceSummary structures
The list of preference entries matching the request.
- nextToken
-
- Type: string
Pagination token. Present when more pages are available;
nullwhen there are no more results.
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.
GetBillingView
$result = $client->getBillingView([/* ... */]); $promise = $client->getBillingViewAsync([/* ... */]);
Returns the metadata associated to the specified billing view ARN.
Parameter Syntax
$result = $client->getBillingView([
'arn' => '<string>', // REQUIRED
]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.
Result Syntax
[
'billingView' => [
'arn' => '<string>',
'billingViewType' => 'PRIMARY|BILLING_GROUP|CUSTOM|BILLING_TRANSFER|BILLING_TRANSFER_SHOWBACK',
'createdAt' => <DateTime>,
'dataFilterExpression' => [
'costCategories' => [
'key' => '<string>',
'values' => ['<string>', ...],
],
'dimensions' => [
'key' => 'LINKED_ACCOUNT',
'values' => ['<string>', ...],
],
'tags' => [
'key' => '<string>',
'values' => ['<string>', ...],
],
'timeRange' => [
'beginDateInclusive' => <DateTime>,
'endDateInclusive' => <DateTime>,
],
],
'derivedViewCount' => <integer>,
'description' => '<string>',
'healthStatus' => [
'statusCode' => 'HEALTHY|UNHEALTHY|CREATING|UPDATING',
'statusReasons' => ['<string>', ...],
],
'name' => '<string>',
'ownerAccountId' => '<string>',
'sourceAccountId' => '<string>',
'sourceViewCount' => <integer>,
'updatedAt' => <DateTime>,
'viewDefinitionLastUpdatedAt' => <DateTime>,
],
]
Result Details
Members
- billingView
-
- Required: Yes
- Type: BillingViewElement structure
The billing view element associated with the specified ARN.
Errors
- ThrottlingException:
The request was denied due to request throttling.
- ResourceNotFoundException:
The specified ARN in the request doesn't exist.
- 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 GetBillingView
$result = $client->getBillingView([
'arn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
]);
Result syntax:
[
'billingView' => [
'name' => 'Example Custom Billing View',
'arn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
'billingViewType' => 'CUSTOM',
'dataFilterExpression' => [
'dimensions' => [
'key' => 'LINKED_ACCOUNT',
'values' => [
'000000000000',
],
],
],
'description' => 'Custom Billing View Example -- updated description',
'ownerAccountId' => '123456789101',
],
]
GetCreditAllocationHistory
$result = $client->getCreditAllocationHistory([/* ... */]); $promise = $client->getCreditAllocationHistoryAsync([/* ... */]);
Returns the per-billing-month allocation history for credits applied to an Amazon Web Services account's bills. Traverses the consolidated billing family to capture cross-account credit applications. Supports pagination and optional filtering to a single credit.
Parameter Syntax
$result = $client->getCreditAllocationHistory([
'accountId' => '<string>', // REQUIRED
'creditId' => <integer>,
'endDate' => <integer || string || DateTime>, // REQUIRED
'maxResults' => <integer>,
'nextToken' => '<string>',
'startDate' => <integer || string || DateTime>, // REQUIRED
]);
Parameter Details
Members
- accountId
-
- Required: Yes
- Type: string
The Amazon Web Services account ID whose allocation history to retrieve. Must be a 12-digit numeric string.
- creditId
-
- Type: long (int|float)
Filters the result to a single credit. When omitted, returns allocation entries for all credits.
- endDate
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
Inclusive end date as Unix epoch seconds.
- maxResults
-
- Type: int
The maximum number of records to return per page. Range: 1 to 1000. Default: 100.
- nextToken
-
- Type: string
Pagination token from a previous response. Pass the value returned in
nextTokento retrieve the next page of results. - startDate
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
Inclusive start date as Unix epoch seconds. Must be on or before
endDate. The range fromstartDatetoendDatecannot exceed 24 billing months.
Result Syntax
[
'creditAllocationHistoryList' => [
[
'accountId' => '<string>',
'appliedServiceName' => '<string>',
'billingMonth' => '<string>',
'creditAmount' => [
'currencyAmount' => '<string>',
'currencyCode' => '<string>',
],
'creditId' => '<string>',
'description' => '<string>',
'isEstimatedBill' => true || false,
],
// ...
],
'failedMonths' => ['<string>', ...],
'nextToken' => '<string>',
'partialResults' => true || false,
]
Result Details
Members
- creditAllocationHistoryList
-
- Type: Array of CreditAllocationHistoryEntry structures
Allocation entries sorted by
billingMonthin descending order. - failedMonths
-
- Type: Array of strings
Billing months in
YYYY-MMformat that failed to return data. Non-empty only whenpartialResultsistrue. - nextToken
-
- Type: string
Pagination token. Present when more pages are available;
nullwhen there are no more results. - partialResults
-
- Required: Yes
- Type: boolean
truewhen data could not be retrieved for one or more billing months. ThefailedMonthsfield lists which months are missing.
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.
GetCredits
$result = $client->getCredits([/* ... */]); $promise = $client->getCreditsAsync([/* ... */]);
Returns the list of Amazon Web Services account credits for the specified account. Each credit includes its identifier, type, monetary amounts, applicable products, expiration, sharing configuration, and current enabled status.
When the caller is the management account of a consolidated billing family and payerAccountFlag is true, the response aggregates credits across the entire family. Otherwise, the response includes only credits owned by the account specified in accountId.
Parameter Syntax
$result = $client->getCredits([
'accountId' => '<string>', // REQUIRED
'endDate' => <integer || string || DateTime>,
'payerAccountFlag' => true || false,
'startDate' => <integer || string || DateTime>, // REQUIRED
]);
Parameter Details
Members
- accountId
-
- Required: Yes
- Type: string
The Amazon Web Services account ID. Must be a 12-digit numeric string.
- endDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The end date for the credit period as Unix epoch seconds. Must not be a future date and must be on or after
startDate. Defaults to the current date when omitted. - payerAccountFlag
-
- Type: boolean
When
trueand the caller is the management account, the response aggregates credits across the entire consolidated billing family. Whenfalseor omitted, returns only credits for the specifiedaccountId. - startDate
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The start date for the credit period as Unix epoch seconds. Must be a past date that is not more than one year before the current date.
Result Syntax
[
'credits' => [
[
'accountHasCreditSharingEnabled' => true || false,
'accountId' => '<string>',
'applicableProductNames' => ['<string>', ...],
'applicationType' => 'BEFORE_CROSS_SERVICE_DISCOUNTS|AFTER_DISCOUNTS',
'costCategoryArn' => '<string>',
'creditConsoleVisibility' => '<string>',
'creditId' => '<string>',
'creditSharingType' => 'DEFAULT|DISABLED|CUSTOM|COST_CATEGORY_RULE',
'creditStatus' => 'ENABLED|DISABLED',
'creditType' => '<string>',
'description' => '<string>',
'endDate' => <DateTime>,
'estimatedAmount' => [
'currencyAmount' => '<string>',
'currencyCode' => '<string>',
],
'exhaustDate' => <DateTime>,
'initialAmount' => [
'currencyAmount' => '<string>',
'currencyCode' => '<string>',
],
'purchaseTypeApplications' => ['<string>', ...],
'remainingAmount' => [
'currencyAmount' => '<string>',
'currencyCode' => '<string>',
],
'ruleName' => '<string>',
'shareableAccounts' => ['<string>', ...],
'startDate' => <DateTime>,
],
// ...
],
]
Result Details
Members
- credits
-
- Type: Array of CreditData structures
The list of credits matching the request. Returns an empty list when no credits exist.
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.
GetResourcePolicy
$result = $client->getResourcePolicy([/* ... */]); $promise = $client->getResourcePolicyAsync([/* ... */]);
Returns the resource-based policy document attached to the resource in JSON format.
Parameter Syntax
$result = $client->getResourcePolicy([
'resourceArn' => '<string>', // REQUIRED
]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the billing view resource to which the policy is attached to.
Result Syntax
[
'policy' => '<string>',
'resourceArn' => '<string>',
]
Result Details
Members
- policy
-
- Type: string
The resource-based policy document attached to the resource in
JSONformat. - resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the billing view resource to which the policy is attached to.
Errors
- ThrottlingException:
The request was denied due to request throttling.
- ResourceNotFoundException:
The specified ARN in the request doesn't exist.
- 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 GetResourcePolicy
$result = $client->getResourcePolicy([
'resourceArn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
]);
Result syntax:
[
'policy' => '{"Version":"2012-10-17","Id":"46f47cb2-a11d-43f3-983d-470b5708a899","Statement":[{"Sid":"ExampleStatement1","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::000000000000:root"},"Action":["ce:GetDimensionValues","ce:GetCostAndUsageWithResources","ce:GetCostAndUsage","ce:GetCostForecast","ce:GetTags","ce:GetUsageForecast","ce:GetCostCategories","billing:GetBillingView"],"Resource":"arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899"}]}',
'resourceArn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
]
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' => [
'activeAfterInclusive' => <integer || string || DateTime>, // REQUIRED
'activeBeforeInclusive' => <integer || string || DateTime>, // REQUIRED
],
'arns' => ['<string>', ...],
'billingViewTypes' => ['<string>', ...],
'maxResults' => <integer>,
'names' => [
[
'searchOption' => 'STARTS_WITH', // REQUIRED
'searchValue' => '<string>', // REQUIRED
],
// ...
],
'nextToken' => '<string>',
'ownerAccountId' => '<string>',
'sourceAccountId' => '<string>',
]);
Parameter Details
Members
- activeTimeRange
-
- Type: ActiveTimeRange structure
The time range for the billing views listed.
PRIMARYbilling view is always listed.BILLING_GROUPbilling 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. - arns
-
- Type: Array of strings
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.
- billingViewTypes
-
- Type: Array of strings
The type of billing view.
- maxResults
-
- Type: int
The maximum number of billing views to retrieve. Default is 100.
- names
-
- Type: Array of StringSearch structures
Filters the list of billing views by name. You can specify search criteria to match billing view names based on the search option provided.
- nextToken
-
- Type: string
The pagination token that is used on subsequent calls to list billing views.
- ownerAccountId
-
- Type: string
The list of owners of the billing view.
- sourceAccountId
-
- Type: string
Filters the results to include only billing views that use the specified account as a source.
Result Syntax
[
'billingViews' => [
[
'arn' => '<string>',
'billingViewType' => 'PRIMARY|BILLING_GROUP|CUSTOM|BILLING_TRANSFER|BILLING_TRANSFER_SHOWBACK',
'description' => '<string>',
'healthStatus' => [
'statusCode' => 'HEALTHY|UNHEALTHY|CREATING|UPDATING',
'statusReasons' => ['<string>', ...],
],
'name' => '<string>',
'ownerAccountId' => '<string>',
'sourceAccountId' => '<string>',
],
// ...
],
'nextToken' => '<string>',
]
Result Details
Members
- billingViews
-
- Required: Yes
- Type: Array of BillingViewListElement structures
A list of
BillingViewListElementretrieved. - 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' => ,
],
]);
ListSourceViewsForBillingView
$result = $client->listSourceViewsForBillingView([/* ... */]); $promise = $client->listSourceViewsForBillingViewAsync([/* ... */]);
Lists the source views (managed Amazon Web Services billing views) associated with the billing view.
Parameter Syntax
$result = $client->listSourceViewsForBillingView([
'arn' => '<string>', // REQUIRED
'maxResults' => <integer>,
'nextToken' => '<string>',
]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.
- maxResults
-
- Type: int
The number of entries a paginated response contains.
- nextToken
-
- Type: string
The pagination token that is used on subsequent calls to list billing views.
Result Syntax
[
'nextToken' => '<string>',
'sourceViews' => ['<string>', ...],
]
Result Details
Members
- nextToken
-
- Type: string
The pagination token that is used on subsequent calls to list billing views.
- sourceViews
-
- Required: Yes
- Type: Array of strings
A list of billing views used as the data source for the custom billing view.
Errors
- ThrottlingException:
The request was denied due to request throttling.
- ResourceNotFoundException:
The specified ARN in the request doesn't exist.
- 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 ListSourceViewsForBillingView
$result = $client->listSourceViewsForBillingView([
'arn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
]);
Result syntax:
[
'sourceViews' => [
'arn:aws:billing::123456789101:billingview/primary',
],
]
ListTagsForResource
$result = $client->listTagsForResource([/* ... */]); $promise = $client->listTagsForResourceAsync([/* ... */]);
Lists tags associated with the billing view resource.
Parameter Syntax
$result = $client->listTagsForResource([
'resourceArn' => '<string>', // REQUIRED
]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource.
Result Syntax
[
'resourceTags' => [
[
'key' => '<string>',
'value' => '<string>',
],
// ...
],
]
Result Details
Members
- resourceTags
-
- Type: Array of ResourceTag structures
A list of tag key value pairs that are associated with the resource.
Errors
- ThrottlingException:
The request was denied due to request throttling.
- ResourceNotFoundException:
The specified ARN in the request doesn't exist.
- 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 ListTagsForResource
$result = $client->listTagsForResource([
'resourceArn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
]);
Result syntax:
[
'resourceTags' => [
[
'key' => 'ExampleTagKey',
'value' => 'ExampleTagValue',
],
],
]
RedeemCredits
$result = $client->redeemCredits([/* ... */]); $promise = $client->redeemCreditsAsync([/* ... */]);
Redeems an Amazon Web Services promotional credit code on behalf of the calling account. On success, a new credit is added to the account's credit ledger with the amount, validity period, and applicable products defined by the promotion. The credit is then automatically applied to subsequent bills according to the standard credit application order.
Parameter Syntax
$result = $client->redeemCredits([
'promoCode' => '<string>', // REQUIRED
]);
Parameter Details
Members
- promoCode
-
- Required: Yes
- Type: string
The promotional credit code to redeem.
Result Syntax
[]
Result Details
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.
TagResource
$result = $client->tagResource([/* ... */]); $promise = $client->tagResourceAsync([/* ... */]);
An API operation for adding one or more tags (key-value pairs) to a resource.
Parameter Syntax
$result = $client->tagResource([
'resourceArn' => '<string>', // REQUIRED
'resourceTags' => [ // REQUIRED
[
'key' => '<string>', // REQUIRED
'value' => '<string>',
],
// ...
],
]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource.
- resourceTags
-
- Required: Yes
- Type: Array of ResourceTag structures
A list of tag key value pairs that are associated with the resource.
Result Syntax
[]
Result Details
Errors
- ThrottlingException:
The request was denied due to request throttling.
- ResourceNotFoundException:
The specified ARN in the request doesn't exist.
- 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 TagResource
$result = $client->tagResource([
'resourceArn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
'resourceTags' => [
[
'key' => 'ExampleTagKey',
'value' => 'ExampleTagValue',
],
],
]);
Result syntax:
[ ]
UntagResource
$result = $client->untagResource([/* ... */]); $promise = $client->untagResourceAsync([/* ... */]);
Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
Parameter Syntax
$result = $client->untagResource([
'resourceArn' => '<string>', // REQUIRED
'resourceTagKeys' => ['<string>', ...], // REQUIRED
]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource.
- resourceTagKeys
-
- Required: Yes
- Type: Array of strings
A list of tag key value pairs that are associated with the resource.
Result Syntax
[]
Result Details
Errors
- ThrottlingException:
The request was denied due to request throttling.
- ResourceNotFoundException:
The specified ARN in the request doesn't exist.
- 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 UntagResource
$result = $client->untagResource([
'resourceArn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
'resourceTagKeys' => [
'ExampleTagKey',
],
]);
Result syntax:
[ ]
UpdateBillingPreferences
$result = $client->updateBillingPreferences([/* ... */]); $promise = $client->updateBillingPreferencesAsync([/* ... */]);
Updates billing preferences for the specified feature. Each feature targets a distinct billing capability and has its own set of supported keys. The action sets the value for each provided key; keys not present in the request are unchanged.
Sharing keys (RI_SHARING, CREDIT_SHARING, CREDIT_LEVEL_SHARING, and sharing keys under CREDIT_PREFERENCE_OPTIONS) may only be set by the management account of a consolidated billing family. The credit/{creditId}/status key may be set by member accounts for credits they own, or by the management account for any credit in the family.
Parameter Syntax
$result = $client->updateBillingPreferences([
'billingPreferencesPerKey' => [ // REQUIRED
[
'key' => '<string>', // REQUIRED
'value' => 'ENABLED|DISABLED', // REQUIRED
],
// ...
],
'feature' => 'RI_SHARING|RI_SHARING_HISTORY|CREDIT_SHARING|CREDIT_SHARING_HISTORY|CREDIT_LEVEL_SHARING|BILLING_ALERTS|CREDIT_PREFERENCE_OPTIONS', // REQUIRED
]);
Parameter Details
Members
- billingPreferencesPerKey
-
- Required: Yes
- Type: Array of BillingPreferenceForKey structures
Key/value pairs to apply. All keys in a single request must be valid for the specified
featureand must not be duplicated. ForCREDIT_PREFERENCE_OPTIONS, all keys must reference the samecreditId. - feature
-
- Required: Yes
- Type: string
The feature to update. Valid values:
BILLING_ALERTS,RI_SHARING,CREDIT_SHARING,CREDIT_LEVEL_SHARING,CREDIT_PREFERENCE_OPTIONS. The history features (RI_SHARING_HISTORYandCREDIT_SHARING_HISTORY) are read-only and cannot be updated.
Result Syntax
[]
Result Details
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.
UpdateBillingView
$result = $client->updateBillingView([/* ... */]); $promise = $client->updateBillingViewAsync([/* ... */]);
An API to update the attributes of the billing view.
Parameter Syntax
$result = $client->updateBillingView([
'arn' => '<string>', // REQUIRED
'dataFilterExpression' => [
'costCategories' => [
'key' => '<string>', // REQUIRED
'values' => ['<string>', ...], // REQUIRED
],
'dimensions' => [
'key' => 'LINKED_ACCOUNT', // REQUIRED
'values' => ['<string>', ...], // REQUIRED
],
'tags' => [
'key' => '<string>', // REQUIRED
'values' => ['<string>', ...], // REQUIRED
],
'timeRange' => [
'beginDateInclusive' => <integer || string || DateTime>,
'endDateInclusive' => <integer || string || DateTime>,
],
],
'description' => '<string>',
'name' => '<string>',
]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.
- dataFilterExpression
-
- Type: Expression structure
See Expression. Billing view only supports
LINKED_ACCOUNT,Tags, andCostCategories. - description
-
- Type: string
The description of the billing view.
- name
-
- Type: string
The name of the billing view.
Result Syntax
[
'arn' => '<string>',
'updatedAt' => <DateTime>,
]
Result Details
Members
- arn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.
- updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the billing view was last updated.
Errors
- BillingViewHealthStatusException:
Exception thrown when a billing view's health status prevents an operation from being performed. This may occur if the billing view is in a state other than
HEALTHY.- ServiceQuotaExceededException:
You've reached the limit of resources you can create, or exceeded the size of an individual resource.
- ThrottlingException:
The request was denied due to request throttling.
- ResourceNotFoundException:
The specified ARN in the request doesn't exist.
- AccessDeniedException:
You don't have sufficient access to perform this action.
- ConflictException:
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
- 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 UpdateBillingView
$result = $client->updateBillingView([
'name' => 'Example Custom Billing View',
'arn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
'dataFilterExpression' => [
'dimensions' => [
'key' => 'LINKED_ACCOUNT',
'values' => [
'000000000000',
],
],
],
'description' => 'Custom Billing View Example -- updated description',
]);
Result syntax:
[
'arn' => 'arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899',
'updatedAt' => ,
]
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.
Amount
Description
A monetary amount with a currency code. Used throughout the Billing API to represent credit balances, allocations, and adjustments.
Members
- currencyAmount
-
- Required: Yes
- Type: string
The amount as a decimal string (for example,
"743.21"). Negative values represent credits that reduce a bill. - currencyCode
-
- Required: Yes
- Type: string
The ISO 4217 currency code for the amount (for example,
USD).
BillingFeatureFilter
Description
A filter that narrows the set of preferences returned by GetBillingPreferences.
Members
- name
-
- Type: string
The filter name. Currently the only supported value is
PREFERENCE_KEY. - value
-
- Type: Array of strings
The filter values to match. For
PREFERENCE_KEY, supply 1 to 10 preference key values to match.
BillingPeriod
Description
A specific billing period identified by year and month.
Members
- month
-
- Required: Yes
- Type: int
The month of the billing period as an integer between 1 and 12.
- year
-
- Required: Yes
- Type: int
The four-digit year of the billing period.
BillingPreferenceForKey
Description
A single key/value entry used to update a billing preference.
Members
- key
-
- Required: Yes
- Type: string
The preference key. Format depends on the feature being updated.
- value
-
- Required: Yes
- Type: string
The preference value. Valid values:
ENABLEDorDISABLED.
BillingPreferenceSummary
Description
A single billing preference entry returned by GetBillingPreferences.
Members
- accountId
-
- Type: string
The associated Amazon Web Services account ID. Populated for account-list keys;
nullotherwise. - accountName
-
- Type: string
The display name of the account. Populated together with
accountId;nullotherwise. - billingPeriod
-
- Type: BillingPeriod structure
The billing period associated with the preference change. Populated only for the history features
RI_SHARING_HISTORYandCREDIT_SHARING_HISTORY. - feature
-
- Required: Yes
- Type: string
The feature this preference belongs to.
- key
-
- Required: Yes
- Type: string
The preference key. Format depends on the feature.
- value
-
- Required: Yes
- Type: string
The preference value. Valid values:
ENABLEDorDISABLED.
BillingViewElement
Description
The metadata associated to the 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 group.
- createdAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the billing view was created.
- dataFilterExpression
-
- Type: Expression structure
See Expression. Billing view only supports
LINKED_ACCOUNT,Tags, andCostCategories. - derivedViewCount
-
- Type: int
The number of billing views that use this billing view as a source.
- description
-
- Type: string
The description of the billing view.
- healthStatus
-
- Type: BillingViewHealthStatus structure
The current health status of the billing view.
- name
-
- Type: string
The account name of the billing view.
- ownerAccountId
-
- Type: string
The account owner of the billing view.
- sourceAccountId
-
- Type: string
The Amazon Web Services account ID that owns the source billing view, if this is a derived billing view.
- sourceViewCount
-
- Type: int
The number of source views associated with this billing view.
- updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the billing view was last updated.
- viewDefinitionLastUpdatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The timestamp of when the billing view definition was last updated.
BillingViewHealthStatus
Description
Represents the health status of a billing view, including a status code and optional reasons for the status.
Members
- statusCode
-
- Type: string
The current health status code of the billing view.
- statusReasons
-
- Type: Array of strings
A list of reasons explaining the current health status, if applicable.
BillingViewHealthStatusException
Description
Exception thrown when a billing view's health status prevents an operation from being performed. This may occur if the billing view is in a state other than HEALTHY.
Members
- message
-
- Required: Yes
- Type: string
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.
- description
-
- Type: string
The description of the billing view.
- healthStatus
-
- Type: BillingViewHealthStatus structure
The current health status of the billing view.
- name
-
- Type: string
A list of names of the Billing view.
- ownerAccountId
-
- Type: string
The list of owners of the Billing view.
- sourceAccountId
-
- Type: string
The Amazon Web Services account ID that owns the source billing view, if this is a derived billing view.
ConflictException
Description
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
Members
- message
-
- Required: Yes
- Type: string
- resourceId
-
- Required: Yes
- Type: string
The identifier for the service resource associated with the request.
- resourceType
-
- Required: Yes
- Type: string
The type of resource associated with the request.
CostCategoryValues
Description
The Cost Categories values used for filtering the costs.
Members
- key
-
- Required: Yes
- Type: string
The unique name of the Cost Category.
- values
-
- Required: Yes
- Type: Array of strings
The specific value of the Cost Category.
CreditAllocationHistoryEntry
Description
A single entry in the credit allocation history, representing how a credit was applied to a specific service during a billing month.
Members
- accountId
-
- Required: Yes
- Type: string
The Amazon Web Services account the credit was applied to.
- appliedServiceName
-
- Required: Yes
- Type: string
The Amazon Web Services service the credit was applied to.
- billingMonth
-
- Required: Yes
- Type: string
The billing month of the application in
YYYY-MMformat. - creditAmount
-
- Required: Yes
- Type: Amount structure
The amount of credit applied. Negative values represent credits that reduced the bill.
- creditId
-
- Required: Yes
- Type: string
The identifier of the credit that was applied.
- description
-
- Type: string
A human-readable description of the credit allocation.
- isEstimatedBill
-
- Required: Yes
- Type: boolean
truewhen the entry was applied to an in-flight bill that has not yet been finalized.
CreditData
Description
Detailed information about an Amazon Web Services credit, including its identifier, type, monetary amounts, applicable products, sharing configuration, and current enabled status.
Members
- accountHasCreditSharingEnabled
-
- Type: boolean
Whether the owning account has account-level credit sharing turned on.
- accountId
-
- Required: Yes
- Type: string
The Amazon Web Services account ID that owns the credit.
- applicableProductNames
-
- Type: Array of strings
The names of Amazon Web Services services this credit applies to.
- applicationType
-
- Type: string
When the credit is applied during bill computation. Valid values:
BEFORE_CROSS_SERVICE_DISCOUNTS,AFTER_DISCOUNTS. - costCategoryArn
-
- Type: string
The Amazon Resource Name (ARN) of the Cost Category controlling the credit's sharing scope. Present only when
creditSharingTypeisCOST_CATEGORY_RULE. - creditConsoleVisibility
-
- Type: string
The display configuration for the credit in the Amazon Web Services Billing console.
- creditId
-
- Required: Yes
- Type: string
The unique identifier for the credit.
- creditSharingType
-
- Type: string
The sharing configuration for the credit. Valid values:
DEFAULT,DISABLED,CUSTOM,COST_CATEGORY_RULE. - creditStatus
-
- Type: string
Whether the credit participates in billing runs. Valid values:
ENABLED,DISABLED. - creditType
-
- Required: Yes
- Type: string
The type of credit. Examples:
Promotion,Refund,TrueUp. - description
-
- Required: Yes
- Type: string
A human-readable description of the credit.
- endDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date the credit expires, as Unix epoch seconds.
- estimatedAmount
-
- Type: Amount structure
The estimated remaining balance, including in-flight (open) bills that have not yet been finalized.
- exhaustDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date the credit balance reached zero, as Unix epoch seconds.
- initialAmount
-
- Required: Yes
- Type: Amount structure
The initial amount of the credit when it was issued.
- purchaseTypeApplications
-
- Type: Array of strings
Restricts which purchase types this credit applies to. When
nullor omitted, the credit applies to all purchase types. - remainingAmount
-
- Required: Yes
- Type: Amount structure
The unused balance of the credit.
- ruleName
-
- Type: string
The rule name within the Cost Category. Present only when
creditSharingTypeisCOST_CATEGORY_RULE. - shareableAccounts
-
- Type: Array of strings
The Amazon Web Services account IDs entitled to apply this credit.
- startDate
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date the credit becomes valid, as Unix epoch seconds.
DimensionValues
Description
The metadata that you can use to filter and group your results.
Members
- key
-
- Required: Yes
- Type: string
The names of the metadata types that you can use to filter and group your results.
- values
-
- Required: Yes
- Type: Array of strings
The metadata values that you can use to filter and group your results.
Expression
Description
See Expression. Billing view only supports LINKED_ACCOUNT, Tags, and CostCategories.
Members
- costCategories
-
- Type: CostCategoryValues structure
The filter that's based on
CostCategoryvalues. - dimensions
-
- Type: DimensionValues structure
The specific
Dimensionto use forExpression. - tags
-
- Type: TagValues structure
The specific
Tagto use forExpression. - timeRange
-
- Type: TimeRange structure
Specifies a time range filter for the billing view data.
InternalServerException
Description
The request processing failed because of an unknown error, exception, or failure.
Members
- message
-
- Required: Yes
- Type: string
ResourceNotFoundException
Description
The specified ARN in the request doesn't exist.
Members
- message
-
- Required: Yes
- Type: string
- resourceId
-
- Required: Yes
- Type: string
Value is a list of resource IDs that were not found.
- resourceType
-
- Required: Yes
- Type: string
Value is the type of resource that was not found.
ResourceTag
Description
The tag structure that contains a tag key and value.
Members
- key
-
- Required: Yes
- Type: string
The key that's associated with the tag.
- value
-
- Type: string
The value that's associated with the tag.
ServiceQuotaExceededException
Description
You've reached the limit of resources you can create, or exceeded the size of an individual resource.
Members
- message
-
- Required: Yes
- Type: string
- quotaCode
-
- Required: Yes
- Type: string
The container for the
quotaCode. - resourceId
-
- Required: Yes
- Type: string
The ID of the resource.
- resourceType
-
- Required: Yes
- Type: string
The type of Amazon Web Services resource.
- serviceCode
-
- Required: Yes
- Type: string
The container for the
serviceCode.
StringSearch
Description
A structure that defines how to search for string values. You can specify a search option and the value to search for.
Members
- searchOption
-
- Required: Yes
- Type: string
The type of search operation to perform on the string value. Determines how the search value is matched against the target field.
- searchValue
-
- Required: Yes
- Type: string
The string value to use in the search operation. This value is compared against the target field using the specified search option.
TagValues
Description
The values that are available for a tag.
Members
- key
-
- Required: Yes
- Type: string
The key for the tag.
- values
-
- Required: Yes
- Type: Array of strings
The specific value of the tag.
ThrottlingException
Description
The request was denied due to request throttling.
Members
- message
-
- Required: Yes
- Type: string
TimeRange
Description
Specifies a time range with inclusive begin and end dates.
Members
- beginDateInclusive
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The inclusive start date of the time range.
- endDateInclusive
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The inclusive end date of the time range.
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.