View a markdown version of this page

GetBillingPreferences - AWS Billing and Cost Management

GetBillingPreferences

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.

Request Syntax

{ "features": [ "string" ], "filters": [ { "name": "string", "value": [ "string" ] } ], "maxResults": number, "nextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

features

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.

Type: Array of strings

Array Members: Fixed number of 1 item.

Valid Values: RI_SHARING | RI_SHARING_HISTORY | CREDIT_SHARING | CREDIT_SHARING_HISTORY | CREDIT_LEVEL_SHARING | BILLING_ALERTS | CREDIT_PREFERENCE_OPTIONS

Required: Yes

filters

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.

Type: Array of BillingFeatureFilter objects

Array Members: Fixed number of 1 item.

Required: No

maxResults

The maximum number of records to return per page. Range: 1 to 50. Default: 50.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 50.

Required: No

nextToken

Pagination token from a previous response. Pass the value returned in nextToken to retrieve the next page of results.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 4095.

Pattern: [-a-zA-Z0-9+=/_]+

Required: No

Response Syntax

{ "billingPreferences": [ { "accountId": "string", "accountName": "string", "billingPeriod": { "month": number, "year": number }, "feature": "string", "key": "string", "value": "string" } ], "nextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

billingPreferences

The list of preference entries matching the request.

Type: Array of BillingPreferenceSummary objects

nextToken

Pagination token. Present when more pages are available; null when there are no more results.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 4095.

Pattern: [-a-zA-Z0-9+=/_]+

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

You don't have sufficient access to perform this action.

HTTP Status Code: 400

InternalServerException

The request processing failed because of an unknown error, exception, or failure.

HTTP Status Code: 500

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 400

ValidationException

The input fails to satisfy the constraints specified by an AWS service.

fieldList

The input fails to satisfy the constraints specified by an AWS service.

reason

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400