[ aws . ce ]

get-savings-plans-purchase-recommendation

Description

Retrieves your request parameters, Savings Plan Recommendations Summary and Details.

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  get-savings-plans-purchase-recommendation
--savings-plans-type <value>
--term-in-years <value>
--payment-option <value>
[--account-scope <value>]
[--next-page-token <value>]
[--page-size <value>]
--lookback-period-in-days <value>
[--filter <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--cli-auto-prompt <value>]

Options

--savings-plans-type (string)

The Savings Plans recommendation type requested.

Possible values:

  • COMPUTE_SP

  • EC2_INSTANCE_SP

--term-in-years (string)

The savings plan recommendation term used to generate these recommendations.

Possible values:

  • ONE_YEAR

  • THREE_YEARS

--payment-option (string)

The payment option used to generate these recommendations.

Possible values:

  • NO_UPFRONT

  • PARTIAL_UPFRONT

  • ALL_UPFRONT

  • LIGHT_UTILIZATION

  • MEDIUM_UTILIZATION

  • HEAVY_UTILIZATION

--account-scope (string)

The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the payer account and linked accounts if the value is set to PAYER . If the value is LINKED , recommendations are calculated for individual linked accounts only.

Possible values:

  • PAYER

  • LINKED

--next-page-token (string)

The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.

--page-size (integer)

The number of recommendations that you want returned in a single response object.

--lookback-period-in-days (string)

The lookback period used to generate the recommendation.

Possible values:

  • SEVEN_DAYS

  • THIRTY_DAYS

  • SIXTY_DAYS

--filter (structure)

You can filter your recommendations by Account ID with the LINKED_ACCOUNT dimension. To filter your recommendations by Account ID, specify Key as LINKED_ACCOUNT and Value as the comma-separated Acount ID(s) for which you want to see Savings Plans purchase recommendations.

For GetSavingsPlansPurchaseRecommendation, the Filter does not include CostCategories or Tags . It only includes Dimensions . With Dimensions , Key must be LINKED_ACCOUNT and Value can be a single Account ID or multiple comma-separated Account IDs for which you want to see Savings Plans Purchase Recommendations. AND and OR operators are not supported.

Or -> (list)

Return results that match either Dimension object.

(structure)

Use Expression to filter by cost or by usage. There are two patterns:

  • Simple dimension values - You can set the dimension name and values for the filters that you plan to use. For example, you can filter for REGION==us-east-1 OR REGION==us-west-1 . The Expression for that looks like this: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } } The list of dimension values are OR’d together to retrieve cost or usage data. You can create Expression and DimensionValues objects using either with* methods or set* methods in multiple lines.

  • Compound dimension values with logical operations - You can use multiple Expression types and the logical operators AND/OR/NOT to create a list of one or more Expression objects. This allows you to filter on more advanced options. For example, you can filter on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer) . The Expression for that looks like this: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }

Note

Because each Expression can have only one operator, the service returns an error if more than one is specified. The following example shows an Expression object that creates an error.

{ "And": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }

Note

For GetRightsizingRecommendation action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren’t supported. Dimensions are also limited to LINKED_ACCOUNT , REGION , or RIGHTSIZING_TYPE .

Or -> (list)

Return results that match either Dimension object.

( … recursive … )

And -> (list)

Return results that match both Dimension objects.

( … recursive … )

( … recursive … )Dimensions -> (structure)

The specific Dimension to use for Expression .

Key -> (string)

The names of the metadata types that you can use to filter and group your results. For example, AZ returns a list of Availability Zones.

Values -> (list)

The metadata values that you can use to filter and group your results. You can use GetDimensionValues to find specific values.

(string)

MatchOptions -> (list)

The match options that you can use to filter your results. MatchOptions is only applicable for actions related to Cost Category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE .

(string)

Tags -> (structure)

The specific Tag to use for Expression .

Key -> (string)

The key for the tag.

Values -> (list)

The specific value of the tag.

(string)

MatchOptions -> (list)

The match options that you can use to filter your results. MatchOptions is only applicable for only applicable for actions related to Cost Category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE .

(string)

CostCategories -> (structure)

The filter based on CostCategory values.

Key -> (string)

The unique name of the Cost Category.

Values -> (list)

The specific value of the Cost Category.

(string)

And -> (list)

Return results that match both Dimension objects.

(structure)

Use Expression to filter by cost or by usage. There are two patterns:

  • Simple dimension values - You can set the dimension name and values for the filters that you plan to use. For example, you can filter for REGION==us-east-1 OR REGION==us-west-1 . The Expression for that looks like this: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } } The list of dimension values are OR’d together to retrieve cost or usage data. You can create Expression and DimensionValues objects using either with* methods or set* methods in multiple lines.

  • Compound dimension values with logical operations - You can use multiple Expression types and the logical operators AND/OR/NOT to create a list of one or more Expression objects. This allows you to filter on more advanced options. For example, you can filter on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer) . The Expression for that looks like this: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }

Note

Because each Expression can have only one operator, the service returns an error if more than one is specified. The following example shows an Expression object that creates an error.

{ "And": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }

Note

For GetRightsizingRecommendation action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren’t supported. Dimensions are also limited to LINKED_ACCOUNT , REGION , or RIGHTSIZING_TYPE .

Or -> (list)

Return results that match either Dimension object.

( … recursive … )

And -> (list)

Return results that match both Dimension objects.

( … recursive … )

( … recursive … )Dimensions -> (structure)

The specific Dimension to use for Expression .

Key -> (string)

The names of the metadata types that you can use to filter and group your results. For example, AZ returns a list of Availability Zones.

Values -> (list)

The metadata values that you can use to filter and group your results. You can use GetDimensionValues to find specific values.

(string)

MatchOptions -> (list)

The match options that you can use to filter your results. MatchOptions is only applicable for actions related to Cost Category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE .

(string)

Tags -> (structure)

The specific Tag to use for Expression .

Key -> (string)

The key for the tag.

Values -> (list)

The specific value of the tag.

(string)

MatchOptions -> (list)

The match options that you can use to filter your results. MatchOptions is only applicable for only applicable for actions related to Cost Category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE .

(string)

CostCategories -> (structure)

The filter based on CostCategory values.

Key -> (string)

The unique name of the Cost Category.

Values -> (list)

The specific value of the Cost Category.

(string)

Not -> (structure)

Return results that don’t match a Dimension object.

Or -> (list)

Return results that match either Dimension object.

( … recursive … )

And -> (list)

Return results that match both Dimension objects.

( … recursive … )

( … recursive … )Dimensions -> (structure)

The specific Dimension to use for Expression .

Key -> (string)

The names of the metadata types that you can use to filter and group your results. For example, AZ returns a list of Availability Zones.

Values -> (list)

The metadata values that you can use to filter and group your results. You can use GetDimensionValues to find specific values.

(string)

MatchOptions -> (list)

The match options that you can use to filter your results. MatchOptions is only applicable for actions related to Cost Category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE .

(string)

Tags -> (structure)

The specific Tag to use for Expression .

Key -> (string)

The key for the tag.

Values -> (list)

The specific value of the tag.

(string)

MatchOptions -> (list)

The match options that you can use to filter your results. MatchOptions is only applicable for only applicable for actions related to Cost Category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE .

(string)

CostCategories -> (structure)

The filter based on CostCategory values.

Key -> (string)

The unique name of the Cost Category.

Values -> (list)

The specific value of the Cost Category.

(string)

Dimensions -> (structure)

The specific Dimension to use for Expression .

Key -> (string)

The names of the metadata types that you can use to filter and group your results. For example, AZ returns a list of Availability Zones.

Values -> (list)

The metadata values that you can use to filter and group your results. You can use GetDimensionValues to find specific values.

(string)

MatchOptions -> (list)

The match options that you can use to filter your results. MatchOptions is only applicable for actions related to Cost Category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE .

(string)

Tags -> (structure)

The specific Tag to use for Expression .

Key -> (string)

The key for the tag.

Values -> (list)

The specific value of the tag.

(string)

MatchOptions -> (list)

The match options that you can use to filter your results. MatchOptions is only applicable for only applicable for actions related to Cost Category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE .

(string)

CostCategories -> (structure)

The filter based on CostCategory values.

Key -> (string)

The unique name of the Cost Category.

Values -> (list)

The specific value of the Cost Category.

(string)

JSON Syntax:

{
  "Or": [
    {
      "Or": [
        { ... recursive ... }
        ...
      ],
      "And": [
        { ... recursive ... }
        ...
      ],
      "Not": { ... recursive ... },
      "Dimensions": {
        "Key": "AZ"|"INSTANCE_TYPE"|"LINKED_ACCOUNT"|"LINKED_ACCOUNT_NAME"|"OPERATION"|"PURCHASE_TYPE"|"REGION"|"SERVICE"|"SERVICE_CODE"|"USAGE_TYPE"|"USAGE_TYPE_GROUP"|"RECORD_TYPE"|"OPERATING_SYSTEM"|"TENANCY"|"SCOPE"|"PLATFORM"|"SUBSCRIPTION_ID"|"LEGAL_ENTITY_NAME"|"DEPLOYMENT_OPTION"|"DATABASE_ENGINE"|"CACHE_ENGINE"|"INSTANCE_TYPE_FAMILY"|"BILLING_ENTITY"|"RESERVATION_ID"|"RESOURCE_ID"|"RIGHTSIZING_TYPE"|"SAVINGS_PLANS_TYPE"|"SAVINGS_PLAN_ARN"|"PAYMENT_OPTION",
        "Values": ["string", ...],
        "MatchOptions": ["EQUALS"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE", ...]
      },
      "Tags": {
        "Key": "string",
        "Values": ["string", ...],
        "MatchOptions": ["EQUALS"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE", ...]
      },
      "CostCategories": {
        "Key": "string",
        "Values": ["string", ...]
      }
    }
    ...
  ],
  "And": [
    {
      "Or": [
        { ... recursive ... }
        ...
      ],
      "And": [
        { ... recursive ... }
        ...
      ],
      "Not": { ... recursive ... },
      "Dimensions": {
        "Key": "AZ"|"INSTANCE_TYPE"|"LINKED_ACCOUNT"|"LINKED_ACCOUNT_NAME"|"OPERATION"|"PURCHASE_TYPE"|"REGION"|"SERVICE"|"SERVICE_CODE"|"USAGE_TYPE"|"USAGE_TYPE_GROUP"|"RECORD_TYPE"|"OPERATING_SYSTEM"|"TENANCY"|"SCOPE"|"PLATFORM"|"SUBSCRIPTION_ID"|"LEGAL_ENTITY_NAME"|"DEPLOYMENT_OPTION"|"DATABASE_ENGINE"|"CACHE_ENGINE"|"INSTANCE_TYPE_FAMILY"|"BILLING_ENTITY"|"RESERVATION_ID"|"RESOURCE_ID"|"RIGHTSIZING_TYPE"|"SAVINGS_PLANS_TYPE"|"SAVINGS_PLAN_ARN"|"PAYMENT_OPTION",
        "Values": ["string", ...],
        "MatchOptions": ["EQUALS"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE", ...]
      },
      "Tags": {
        "Key": "string",
        "Values": ["string", ...],
        "MatchOptions": ["EQUALS"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE", ...]
      },
      "CostCategories": {
        "Key": "string",
        "Values": ["string", ...]
      }
    }
    ...
  ],
  "Not": {
    "Or": [
      { ... recursive ... }
      ...
    ],
    "And": [
      { ... recursive ... }
      ...
    ],
    "Not": { ... recursive ... },
    "Dimensions": {
      "Key": "AZ"|"INSTANCE_TYPE"|"LINKED_ACCOUNT"|"LINKED_ACCOUNT_NAME"|"OPERATION"|"PURCHASE_TYPE"|"REGION"|"SERVICE"|"SERVICE_CODE"|"USAGE_TYPE"|"USAGE_TYPE_GROUP"|"RECORD_TYPE"|"OPERATING_SYSTEM"|"TENANCY"|"SCOPE"|"PLATFORM"|"SUBSCRIPTION_ID"|"LEGAL_ENTITY_NAME"|"DEPLOYMENT_OPTION"|"DATABASE_ENGINE"|"CACHE_ENGINE"|"INSTANCE_TYPE_FAMILY"|"BILLING_ENTITY"|"RESERVATION_ID"|"RESOURCE_ID"|"RIGHTSIZING_TYPE"|"SAVINGS_PLANS_TYPE"|"SAVINGS_PLAN_ARN"|"PAYMENT_OPTION",
      "Values": ["string", ...],
      "MatchOptions": ["EQUALS"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE", ...]
    },
    "Tags": {
      "Key": "string",
      "Values": ["string", ...],
      "MatchOptions": ["EQUALS"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE", ...]
    },
    "CostCategories": {
      "Key": "string",
      "Values": ["string", ...]
    }
  },
  "Dimensions": {
    "Key": "AZ"|"INSTANCE_TYPE"|"LINKED_ACCOUNT"|"LINKED_ACCOUNT_NAME"|"OPERATION"|"PURCHASE_TYPE"|"REGION"|"SERVICE"|"SERVICE_CODE"|"USAGE_TYPE"|"USAGE_TYPE_GROUP"|"RECORD_TYPE"|"OPERATING_SYSTEM"|"TENANCY"|"SCOPE"|"PLATFORM"|"SUBSCRIPTION_ID"|"LEGAL_ENTITY_NAME"|"DEPLOYMENT_OPTION"|"DATABASE_ENGINE"|"CACHE_ENGINE"|"INSTANCE_TYPE_FAMILY"|"BILLING_ENTITY"|"RESERVATION_ID"|"RESOURCE_ID"|"RIGHTSIZING_TYPE"|"SAVINGS_PLANS_TYPE"|"SAVINGS_PLAN_ARN"|"PAYMENT_OPTION",
    "Values": ["string", ...],
    "MatchOptions": ["EQUALS"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE", ...]
  },
  "Tags": {
    "Key": "string",
    "Values": ["string", ...],
    "MatchOptions": ["EQUALS"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE", ...]
  },
  "CostCategories": {
    "Key": "string",
    "Values": ["string", ...]
  }
}

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

--cli-auto-prompt (boolean) Automatically prompt for CLI input parameters.

See ‘aws help’ for descriptions of global parameters.

Output

Metadata -> (structure)

Information regarding this specific recommendation set.

RecommendationId -> (string)

The unique identifier for the recommendation set.

GenerationTimestamp -> (string)

The timestamp showing when the recommendations were generated.

SavingsPlansPurchaseRecommendation -> (structure)

Contains your request parameters, Savings Plan Recommendations Summary, and Details.

AccountScope -> (string)

The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the payer account and linked accounts if the value is set to PAYER . If the value is LINKED , recommendations are calculated for individual linked accounts only.

SavingsPlansType -> (string)

The requested Savings Plans recommendation type.

TermInYears -> (string)

The Savings Plans recommendation term in years, used to generate the recommendation.

PaymentOption -> (string)

The payment option used to generate the recommendation.

LookbackPeriodInDays -> (string)

The lookback period in days, used to generate the recommendation.

SavingsPlansPurchaseRecommendationDetails -> (list)

Details for the Savings Plans we recommend that you purchase to cover existing Savings Plans eligible workloads.

(structure)

Details for your recommended Savings Plans.

SavingsPlansDetails -> (structure)

Details for your recommended Savings Plans.

Region -> (string)

A collection of AWS resources in a geographic area. Each AWS Region is isolated and independent of the other Regions.

InstanceFamily -> (string)

A group of instance types that Savings Plans applies to.

OfferingId -> (string)

The unique ID used to distinguish Savings Plans from one another.

AccountId -> (string)

The AccountID the recommendation is generated for.

UpfrontCost -> (string)

The upfront cost of the recommended Savings Plans, based on the selected payment option.

EstimatedROI -> (string)

The estimated return on investment based on the recommended Savings Plans purchased. This is calculated as estimatedSavingsAmount / estimatedSPCost *100.

CurrencyCode -> (string)

The currency code Amazon Web Services used to generate the recommendations and present potential savings.

EstimatedSPCost -> (string)

The cost of the recommended Savings Plans over the length of the lookback period.

EstimatedOnDemandCost -> (string)

The remaining On-Demand cost estimated to not be covered by the recommended Savings Plans, over the length of the lookback period.

EstimatedOnDemandCostWithCurrentCommitment -> (string)

The estimated On-Demand costs you would expect with no additional commitment, based on your usage of the selected time period and the Savings Plans you own.

EstimatedSavingsAmount -> (string)

The estimated savings amount based on the recommended Savings Plans over the length of the lookback period.

EstimatedSavingsPercentage -> (string)

The estimated savings percentage relative to the total cost of applicable On-Demand usage over the lookback period.

HourlyCommitmentToPurchase -> (string)

The recommended hourly commitment level for the Savings Plans type, and configuration based on the usage during the lookback period.

EstimatedAverageUtilization -> (string)

The estimated utilization of the recommended Savings Plans.

EstimatedMonthlySavingsAmount -> (string)

The estimated monthly savings amount, based on the recommended Savings Plans.

CurrentMinimumHourlyOnDemandSpend -> (string)

The lowest value of hourly On-Demand spend over the lookback period of the applicable usage type.

CurrentMaximumHourlyOnDemandSpend -> (string)

The highest value of hourly On-Demand spend over the lookback period of the applicable usage type.

CurrentAverageHourlyOnDemandSpend -> (string)

The average value of hourly On-Demand spend over the lookback period of the applicable usage type.

SavingsPlansPurchaseRecommendationSummary -> (structure)

Summary metrics for your Savings Plans Recommendations.

EstimatedROI -> (string)

The estimated return on investment based on the recommended Savings Plans and estimated savings.

CurrencyCode -> (string)

The currency code Amazon Web Services used to generate the recommendations and present potential savings.

EstimatedTotalCost -> (string)

The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of the cost of Savings Plans during this term, and the remaining On-Demand usage.

CurrentOnDemandSpend -> (string)

The current total on demand spend of the applicable usage types over the lookback period.

EstimatedSavingsAmount -> (string)

The estimated total savings over the lookback period, based on the purchase of the recommended Savings Plans.

TotalRecommendationCount -> (string)

The aggregate number of Savings Plans recommendations that exist for your account.

DailyCommitmentToPurchase -> (string)

The recommended Savings Plans cost on a daily (24 hourly) basis.

HourlyCommitmentToPurchase -> (string)

The recommended hourly commitment based on the recommendation parameters.

EstimatedSavingsPercentage -> (string)

The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is calculated as estimatedSavingsAmount / CurrentOnDemandSpend *100.

EstimatedMonthlySavingsAmount -> (string)

The estimated monthly savings amount, based on the recommended Savings Plans purchase.

EstimatedOnDemandCostWithCurrentCommitment -> (string)

The estimated On-Demand costs you would expect with no additional commitment, based on your usage of the selected time period and the Savings Plans you own.

NextPageToken -> (string)

The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.