preferences
Creates, updates, deletes, gets or lists a preferences resource.
Overview
| Name | preferences |
| Type | Resource |
| Id | aws.cost_optimization_hub.preferences |
Fields
The following fields are returned by SELECT queries:
- get_preferences
| Name | Datatype | Description |
|---|---|---|
member_account_discount_visibility | string | Retrieves the status of the "member account discount visibility" preference. (All, None) |
preferred_commitment | object | Retrieves the current preferences for how Reserved Instances and Savings Plans cost-saving opportunities are prioritized in terms of payment option and term length. |
savings_estimation_mode | string | Retrieves the status of the "savings estimation mode" preference. (BeforeDiscounts, AfterDiscounts) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_preferences | select | region | Returns a set of preferences for an account in order to add account-specific preferences into the service. These preferences impact how the savings associated with recommendations are presented—estimated savings after discounts or estimated savings before discounts, for example. | |
update_preferences | update | region | Updates a set of preferences for an account in order to add account-specific preferences into the service. These preferences impact how the savings associated with recommendations are presented. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_preferences
Returns a set of preferences for an account in order to add account-specific preferences into the service. These preferences impact how the savings associated with recommendations are presented—estimated savings after discounts or estimated savings before discounts, for example.
SELECT
member_account_discount_visibility,
preferred_commitment,
savings_estimation_mode
FROM aws.cost_optimization_hub.preferences
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- update_preferences
Updates a set of preferences for an account in order to add account-specific preferences into the service. These preferences impact how the savings associated with recommendations are presented.
UPDATE aws.cost_optimization_hub.preferences
SET
savingsEstimationMode = '{{ savingsEstimationMode }}',
memberAccountDiscountVisibility = '{{ memberAccountDiscountVisibility }}',
preferredCommitment = '{{ preferredCommitment }}'
WHERE
region = '{{ region }}' --required
RETURNING
member_account_discount_visibility,
preferred_commitment,
savings_estimation_mode;