Skip to main content

billing_preferences

Creates, updates, deletes, gets or lists a billing_preferences resource.

Overview

Namebilling_preferences
TypeResource
Idaws.billing.billing_preferences

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
billing_preferencesarrayThe list of preference entries matching the request.
next_tokenstringPagination token. Present when more pages are available; null when there are no more results. (pattern: <code>[-a-zA-Z0-9+=/_]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_billing_preferencesselectregionRetrieves 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.
update_billing_preferencesupdateregion, feature, billingPreferencesPerKeyUpdates 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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.

SELECT
billing_preferences,
next_token
FROM aws.billing.billing_preferences
WHERE region = '{{ region }}' -- required
;

UPDATE examples

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.

UPDATE aws.billing.billing_preferences
SET
feature = '{{ feature }}',
billingPreferencesPerKey = '{{ billingPreferencesPerKey }}'
WHERE
region = '{{ region }}' --required
AND feature = '{{ feature }}' --required
AND billingPreferencesPerKey = '{{ billingPreferencesPerKey }}' --required;