CostOptimizationHubClient

You can use the Cost Optimization Hub API to programmatically identify, filter, aggregate, and quantify savings for your cost optimization recommendations across multiple Amazon Web Services Regions and Amazon Web Services accounts in your organization.

The Cost Optimization Hub API provides the following endpoint:

  • https://cost-optimization-hub.us-east-1.amazonaws.com

Installation

NPM
npm install @aws-sdk/client-cost-optimization-hub
Yarn
yarn add @aws-sdk/client-cost-optimization-hub
pnpm
pnpm add @aws-sdk/client-cost-optimization-hub

CostOptimizationHubClient Operations

Command
Summary
GetPreferencesCommand

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.

GetRecommendationCommand

Returns both the current and recommended resource configuration and the estimated cost impact for a recommendation.

The recommendationId is only valid for up to a maximum of 24 hours as recommendations are refreshed daily. To retrieve the recommendationId, use the ListRecommendations API.

ListEnrollmentStatusesCommand

Retrieves the enrollment status for an account. It can also return the list of accounts that are enrolled under the organization.

ListRecommendationSummariesCommand

Returns a concise representation of savings estimates for resources. Also returns de-duped savings across different types of recommendations.

The following filters are not supported for this API: recommendationIds, resourceArns, and resourceIds.

ListRecommendationsCommand

Returns a list of recommendations.

UpdateEnrollmentStatusCommand

Updates the enrollment (opt in and opt out) status of an account to the Cost Optimization Hub service.

If the account is a management account or delegated administrator of an organization, this action can also be used to enroll member accounts of the organization.

You must have the appropriate permissions to opt in to Cost Optimization Hub and to view its recommendations. When you opt in, Cost Optimization Hub automatically creates a service-linked role in your account to access its data.

UpdatePreferencesCommand

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.

CostOptimizationHubClient Configuration

Parameter
Type
Description
defaultsMode
Optional
DefaultsMode | Provider<DefaultsMode>
The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.
disableHostPrefix
Optional
boolean
Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation.
extensions
Optional
RuntimeExtension[]
Optional extensions
logger
Optional
Logger
Optional logger for logging debug/info/warn/error.
maxAttempts
Optional
number | Provider<number>
Value for how many times a request will be made at most in case of retry.
profile
Optional
string
Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options.
region
Optional
string | Provider<string>
The AWS region to which this client will send requests
requestHandler
Optional
__HttpHandlerUserInput
The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
retryMode
Optional
string | Provider<string>
Specifies which retry algorithm to use.
useDualstackEndpoint
Optional
boolean | Provider<boolean>
Enables IPv6/IPv4 dualstack endpoint.
useFipsEndpoint
Optional
boolean | Provider<boolean>
Enables FIPS compatible endpoints.
Additional config fields are described in the full configuration type: CostOptimizationHubClientConfig