CostOptimizationHub ******************* Client ====== class CostOptimizationHub.Client A low-level client representing Cost Optimization Hub 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 import boto3 client = boto3.client('cost-optimization-hub') These are the available methods: * can_paginate * close * get_paginator * get_preferences * get_recommendation * get_waiter * list_enrollment_statuses * list_recommendation_summaries * list_recommendations * update_enrollment_status * update_preferences Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * ListEnrollmentStatuses * ListRecommendationSummaries * ListRecommendations CostOptimizationHub / Paginator / ListRecommendationSummaries ListRecommendationSummaries *************************** class CostOptimizationHub.Paginator.ListRecommendationSummaries paginator = client.get_paginator('list_recommendation_summaries') paginate(**kwargs) Creates an iterator that will paginate through responses from "CostOptimizationHub.Client.list_recommendation_summaries()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( filter={ 'restartNeeded': True|False, 'rollbackPossible': True|False, 'implementationEfforts': [ 'VeryLow'|'Low'|'Medium'|'High'|'VeryHigh', ], 'accountIds': [ 'string', ], 'regions': [ 'string', ], 'resourceTypes': [ 'Ec2Instance'|'LambdaFunction'|'EbsVolume'|'EcsService'|'Ec2AutoScalingGroup'|'Ec2InstanceSavingsPlans'|'ComputeSavingsPlans'|'SageMakerSavingsPlans'|'Ec2ReservedInstances'|'RdsReservedInstances'|'OpenSearchReservedInstances'|'RedshiftReservedInstances'|'ElastiCacheReservedInstances'|'RdsDbInstanceStorage'|'RdsDbInstance'|'AuroraDbClusterStorage'|'DynamoDbReservedCapacity'|'MemoryDbReservedInstances', ], 'actionTypes': [ 'Rightsize'|'Stop'|'Upgrade'|'PurchaseSavingsPlans'|'PurchaseReservedInstances'|'MigrateToGraviton'|'Delete'|'ScaleIn', ], 'tags': [ { 'key': 'string', 'value': 'string' }, ], 'resourceIds': [ 'string', ], 'resourceArns': [ 'string', ], 'recommendationIds': [ 'string', ] }, groupBy='string', metrics=[ 'SavingsPercentage', ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **filter** (*dict*) -- Describes a filter that returns a more specific list of recommendations. Filters recommendations by different dimensions. * **restartNeeded** *(boolean) --* Whether or not implementing the recommendation requires a restart. * **rollbackPossible** *(boolean) --* Whether or not implementing the recommendation can be rolled back. * **implementationEfforts** *(list) --* The effort required to implement the recommendation. * *(string) --* * **accountIds** *(list) --* The account to which the recommendation applies. * *(string) --* * **regions** *(list) --* The Amazon Web Services Region of the resource. * *(string) --* * **resourceTypes** *(list) --* The resource type of the recommendation. * *(string) --* * **actionTypes** *(list) --* The type of action you can take by adopting the recommendation. * *(string) --* * **tags** *(list) --* A list of tags assigned to the recommendation. * *(dict) --* The tag structure that contains a tag key and value. * **key** *(string) --* The key that's associated with the tag. * **value** *(string) --* The value that's associated with the tag. * **resourceIds** *(list) --* The resource ID of the recommendation. * *(string) --* * **resourceArns** *(list) --* The Amazon Resource Name (ARN) of the recommendation. * *(string) --* * **recommendationIds** *(list) --* The IDs for the recommendations. * *(string) --* * **groupBy** (*string*) -- **[REQUIRED]** The grouping of recommendations by a dimension. * **metrics** (*list*) -- Additional metrics to be returned for the request. The only valid value is "savingsPercentage". * *(string) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'estimatedTotalDedupedSavings': 123.0, 'items': [ { 'group': 'string', 'estimatedMonthlySavings': 123.0, 'recommendationCount': 123 }, ], 'groupBy': 'string', 'currencyCode': 'string', 'metrics': { 'savingsPercentage': 'string' }, 'NextToken': 'string' } **Response Structure** * *(dict) --* * **estimatedTotalDedupedSavings** *(float) --* The total overall savings for the aggregated view. * **items** *(list) --* A list of all savings recommendations. * *(dict) --* The summary of rightsizing recommendations, including de-duped savings from all types of recommendations. * **group** *(string) --* The grouping of recommendations. * **estimatedMonthlySavings** *(float) --* The estimated total savings resulting from modifications, on a monthly basis. * **recommendationCount** *(integer) --* The total number of instance recommendations. * **groupBy** *(string) --* The dimension used to group the recommendations by. * **currencyCode** *(string) --* The currency code used for the recommendation. * **metrics** *(dict) --* The results or descriptions for the additional metrics, based on whether the metrics were or were not requested. * **savingsPercentage** *(string) --* The savings percentage based on your Amazon Web Services spend over the past 30 days. Note: Savings percentage is only supported when filtering by Region, account ID, or tags. * **NextToken** *(string) --* A token to resume pagination. CostOptimizationHub / Paginator / ListRecommendations ListRecommendations ******************* class CostOptimizationHub.Paginator.ListRecommendations paginator = client.get_paginator('list_recommendations') paginate(**kwargs) Creates an iterator that will paginate through responses from "CostOptimizationHub.Client.list_recommendations()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( filter={ 'restartNeeded': True|False, 'rollbackPossible': True|False, 'implementationEfforts': [ 'VeryLow'|'Low'|'Medium'|'High'|'VeryHigh', ], 'accountIds': [ 'string', ], 'regions': [ 'string', ], 'resourceTypes': [ 'Ec2Instance'|'LambdaFunction'|'EbsVolume'|'EcsService'|'Ec2AutoScalingGroup'|'Ec2InstanceSavingsPlans'|'ComputeSavingsPlans'|'SageMakerSavingsPlans'|'Ec2ReservedInstances'|'RdsReservedInstances'|'OpenSearchReservedInstances'|'RedshiftReservedInstances'|'ElastiCacheReservedInstances'|'RdsDbInstanceStorage'|'RdsDbInstance'|'AuroraDbClusterStorage'|'DynamoDbReservedCapacity'|'MemoryDbReservedInstances', ], 'actionTypes': [ 'Rightsize'|'Stop'|'Upgrade'|'PurchaseSavingsPlans'|'PurchaseReservedInstances'|'MigrateToGraviton'|'Delete'|'ScaleIn', ], 'tags': [ { 'key': 'string', 'value': 'string' }, ], 'resourceIds': [ 'string', ], 'resourceArns': [ 'string', ], 'recommendationIds': [ 'string', ] }, orderBy={ 'dimension': 'string', 'order': 'Asc'|'Desc' }, includeAllRecommendations=True|False, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **filter** (*dict*) -- The constraints that you want all returned recommendations to match. * **restartNeeded** *(boolean) --* Whether or not implementing the recommendation requires a restart. * **rollbackPossible** *(boolean) --* Whether or not implementing the recommendation can be rolled back. * **implementationEfforts** *(list) --* The effort required to implement the recommendation. * *(string) --* * **accountIds** *(list) --* The account to which the recommendation applies. * *(string) --* * **regions** *(list) --* The Amazon Web Services Region of the resource. * *(string) --* * **resourceTypes** *(list) --* The resource type of the recommendation. * *(string) --* * **actionTypes** *(list) --* The type of action you can take by adopting the recommendation. * *(string) --* * **tags** *(list) --* A list of tags assigned to the recommendation. * *(dict) --* The tag structure that contains a tag key and value. * **key** *(string) --* The key that's associated with the tag. * **value** *(string) --* The value that's associated with the tag. * **resourceIds** *(list) --* The resource ID of the recommendation. * *(string) --* * **resourceArns** *(list) --* The Amazon Resource Name (ARN) of the recommendation. * *(string) --* * **recommendationIds** *(list) --* The IDs for the recommendations. * *(string) --* * **orderBy** (*dict*) -- The ordering of recommendations by a dimension. * **dimension** *(string) --* Sorts by dimension values. * **order** *(string) --* The order that's used to sort the data. * **includeAllRecommendations** (*boolean*) -- List of all recommendations for a resource, or a single recommendation if de-duped by "resourceId". * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'items': [ { 'recommendationId': 'string', 'accountId': 'string', 'region': 'string', 'resourceId': 'string', 'resourceArn': 'string', 'currentResourceType': 'string', 'recommendedResourceType': 'string', 'estimatedMonthlySavings': 123.0, 'estimatedSavingsPercentage': 123.0, 'estimatedMonthlyCost': 123.0, 'currencyCode': 'string', 'implementationEffort': 'string', 'restartNeeded': True|False, 'actionType': 'string', 'rollbackPossible': True|False, 'currentResourceSummary': 'string', 'recommendedResourceSummary': 'string', 'lastRefreshTimestamp': datetime(2015, 1, 1), 'recommendationLookbackPeriodInDays': 123, 'source': 'ComputeOptimizer'|'CostExplorer', 'tags': [ { 'key': 'string', 'value': 'string' }, ] }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **items** *(list) --* List of all savings recommendations. * *(dict) --* Describes a recommendation. * **recommendationId** *(string) --* The ID for the recommendation. * **accountId** *(string) --* The account to which the recommendation applies. * **region** *(string) --* The Amazon Web Services Region of the resource. * **resourceId** *(string) --* The resource ID for the recommendation. * **resourceArn** *(string) --* The Amazon Resource Name (ARN) for the recommendation. * **currentResourceType** *(string) --* The current resource type. * **recommendedResourceType** *(string) --* The recommended resource type. * **estimatedMonthlySavings** *(float) --* The estimated monthly savings amount for the recommendation. * **estimatedSavingsPercentage** *(float) --* The estimated savings percentage relative to the total cost over the cost calculation lookback period. * **estimatedMonthlyCost** *(float) --* The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage. * **currencyCode** *(string) --* The currency code used for the recommendation. * **implementationEffort** *(string) --* The effort required to implement the recommendation. * **restartNeeded** *(boolean) --* Whether or not implementing the recommendation requires a restart. * **actionType** *(string) --* The type of tasks that can be carried out by this action. * **rollbackPossible** *(boolean) --* Whether or not implementing the recommendation can be rolled back. * **currentResourceSummary** *(string) --* Describes the current resource. * **recommendedResourceSummary** *(string) --* Describes the recommended resource. * **lastRefreshTimestamp** *(datetime) --* The time when the recommendation was last generated. * **recommendationLookbackPeriodInDays** *(integer) --* The lookback period that's used to generate the recommendation. * **source** *(string) --* The source of the recommendation. * **tags** *(list) --* A list of tags assigned to the recommendation. * *(dict) --* The tag structure that contains a tag key and value. * **key** *(string) --* The key that's associated with the tag. * **value** *(string) --* The value that's associated with the tag. * **NextToken** *(string) --* A token to resume pagination. CostOptimizationHub / Paginator / ListEnrollmentStatuses ListEnrollmentStatuses ********************** class CostOptimizationHub.Paginator.ListEnrollmentStatuses paginator = client.get_paginator('list_enrollment_statuses') paginate(**kwargs) Creates an iterator that will paginate through responses from "CostOptimizationHub.Client.list_enrollment_statuses()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( includeOrganizationInfo=True|False, accountId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **includeOrganizationInfo** (*boolean*) -- Indicates whether to return the enrollment status for the organization. * **accountId** (*string*) -- The account ID of a member account in the organization. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'items': [ { 'accountId': 'string', 'status': 'Active'|'Inactive', 'lastUpdatedTimestamp': datetime(2015, 1, 1), 'createdTimestamp': datetime(2015, 1, 1) }, ], 'includeMemberAccounts': True|False, 'NextToken': 'string' } **Response Structure** * *(dict) --* * **items** *(list) --* The enrollment status of a specific account ID, including creation and last updated timestamps. * *(dict) --* Describes the enrollment status of an organization's member accounts in Cost Optimization Hub. * **accountId** *(string) --* The Amazon Web Services account ID. * **status** *(string) --* The account enrollment status. * **lastUpdatedTimestamp** *(datetime) --* The time when the account enrollment status was last updated. * **createdTimestamp** *(datetime) --* The time when the account enrollment status was created. * **includeMemberAccounts** *(boolean) --* The enrollment status of all member accounts in the organization if the account is the management account or delegated administrator. * **NextToken** *(string) --* A token to resume pagination. CostOptimizationHub / Client / list_recommendation_summaries list_recommendation_summaries ***************************** CostOptimizationHub.Client.list_recommendation_summaries(**kwargs) Returns a concise representation of savings estimates for resources. Also returns de-duped savings across different types of recommendations. Note: The following filters are not supported for this API: "recommendationIds", "resourceArns", and "resourceIds". See also: AWS API Documentation **Request Syntax** response = client.list_recommendation_summaries( filter={ 'restartNeeded': True|False, 'rollbackPossible': True|False, 'implementationEfforts': [ 'VeryLow'|'Low'|'Medium'|'High'|'VeryHigh', ], 'accountIds': [ 'string', ], 'regions': [ 'string', ], 'resourceTypes': [ 'Ec2Instance'|'LambdaFunction'|'EbsVolume'|'EcsService'|'Ec2AutoScalingGroup'|'Ec2InstanceSavingsPlans'|'ComputeSavingsPlans'|'SageMakerSavingsPlans'|'Ec2ReservedInstances'|'RdsReservedInstances'|'OpenSearchReservedInstances'|'RedshiftReservedInstances'|'ElastiCacheReservedInstances'|'RdsDbInstanceStorage'|'RdsDbInstance'|'AuroraDbClusterStorage'|'DynamoDbReservedCapacity'|'MemoryDbReservedInstances', ], 'actionTypes': [ 'Rightsize'|'Stop'|'Upgrade'|'PurchaseSavingsPlans'|'PurchaseReservedInstances'|'MigrateToGraviton'|'Delete'|'ScaleIn', ], 'tags': [ { 'key': 'string', 'value': 'string' }, ], 'resourceIds': [ 'string', ], 'resourceArns': [ 'string', ], 'recommendationIds': [ 'string', ] }, groupBy='string', maxResults=123, metrics=[ 'SavingsPercentage', ], nextToken='string' ) Parameters: * **filter** (*dict*) -- Describes a filter that returns a more specific list of recommendations. Filters recommendations by different dimensions. * **restartNeeded** *(boolean) --* Whether or not implementing the recommendation requires a restart. * **rollbackPossible** *(boolean) --* Whether or not implementing the recommendation can be rolled back. * **implementationEfforts** *(list) --* The effort required to implement the recommendation. * *(string) --* * **accountIds** *(list) --* The account to which the recommendation applies. * *(string) --* * **regions** *(list) --* The Amazon Web Services Region of the resource. * *(string) --* * **resourceTypes** *(list) --* The resource type of the recommendation. * *(string) --* * **actionTypes** *(list) --* The type of action you can take by adopting the recommendation. * *(string) --* * **tags** *(list) --* A list of tags assigned to the recommendation. * *(dict) --* The tag structure that contains a tag key and value. * **key** *(string) --* The key that's associated with the tag. * **value** *(string) --* The value that's associated with the tag. * **resourceIds** *(list) --* The resource ID of the recommendation. * *(string) --* * **resourceArns** *(list) --* The Amazon Resource Name (ARN) of the recommendation. * *(string) --* * **recommendationIds** *(list) --* The IDs for the recommendations. * *(string) --* * **groupBy** (*string*) -- **[REQUIRED]** The grouping of recommendations by a dimension. * **maxResults** (*integer*) -- The maximum number of recommendations to be returned for the request. * **metrics** (*list*) -- Additional metrics to be returned for the request. The only valid value is "savingsPercentage". * *(string) --* * **nextToken** (*string*) -- The token to retrieve the next set of results. Return type: dict Returns: **Response Syntax** { 'estimatedTotalDedupedSavings': 123.0, 'items': [ { 'group': 'string', 'estimatedMonthlySavings': 123.0, 'recommendationCount': 123 }, ], 'groupBy': 'string', 'currencyCode': 'string', 'metrics': { 'savingsPercentage': 'string' }, 'nextToken': 'string' } **Response Structure** * *(dict) --* * **estimatedTotalDedupedSavings** *(float) --* The total overall savings for the aggregated view. * **items** *(list) --* A list of all savings recommendations. * *(dict) --* The summary of rightsizing recommendations, including de- duped savings from all types of recommendations. * **group** *(string) --* The grouping of recommendations. * **estimatedMonthlySavings** *(float) --* The estimated total savings resulting from modifications, on a monthly basis. * **recommendationCount** *(integer) --* The total number of instance recommendations. * **groupBy** *(string) --* The dimension used to group the recommendations by. * **currencyCode** *(string) --* The currency code used for the recommendation. * **metrics** *(dict) --* The results or descriptions for the additional metrics, based on whether the metrics were or were not requested. * **savingsPercentage** *(string) --* The savings percentage based on your Amazon Web Services spend over the past 30 days. Note: Savings percentage is only supported when filtering by Region, account ID, or tags. * **nextToken** *(string) --* The token to retrieve the next set of results. **Exceptions** * "CostOptimizationHub.Client.exceptions.ValidationException" * "CostOptimizationHub.Client.exceptions.InternalServerException" * "CostOptimizationHub.Client.exceptions.AccessDeniedException" * "CostOptimizationHub.Client.exceptions.ThrottlingException" CostOptimizationHub / Client / get_paginator get_paginator ************* CostOptimizationHub.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. CostOptimizationHub / Client / get_preferences get_preferences *************** CostOptimizationHub.Client.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. See also: AWS API Documentation **Request Syntax** response = client.get_preferences() Return type: dict Returns: **Response Syntax** { 'savingsEstimationMode': 'BeforeDiscounts'|'AfterDiscounts', 'memberAccountDiscountVisibility': 'All'|'None', 'preferredCommitment': { 'term': 'OneYear'|'ThreeYears', 'paymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront' } } **Response Structure** * *(dict) --* * **savingsEstimationMode** *(string) --* Retrieves the status of the "savings estimation mode" preference. * **memberAccountDiscountVisibility** *(string) --* Retrieves the status of the "member account discount visibility" preference. * **preferredCommitment** *(dict) --* Retrieves the current preferences for how Reserved Instances and Savings Plans cost-saving opportunities are prioritized in terms of payment option and term length. * **term** *(string) --* The preferred length of the commitment period. If the value is null, it will default to "ThreeYears" (highest savings) where applicable. * **paymentOption** *(string) --* The preferred upfront payment structure for commitments. If the value is null, it will default to "AllUpfront" (highest savings) where applicable. **Exceptions** * "CostOptimizationHub.Client.exceptions.ValidationException" * "CostOptimizationHub.Client.exceptions.InternalServerException" * "CostOptimizationHub.Client.exceptions.AccessDeniedException" * "CostOptimizationHub.Client.exceptions.ThrottlingException" CostOptimizationHub / Client / can_paginate can_paginate ************ CostOptimizationHub.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. CostOptimizationHub / Client / update_preferences update_preferences ****************** CostOptimizationHub.Client.update_preferences(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.update_preferences( savingsEstimationMode='BeforeDiscounts'|'AfterDiscounts', memberAccountDiscountVisibility='All'|'None', preferredCommitment={ 'term': 'OneYear'|'ThreeYears', 'paymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront' } ) Parameters: * **savingsEstimationMode** (*string*) -- Sets the "savings estimation mode" preference. * **memberAccountDiscountVisibility** (*string*) -- Sets the "member account discount visibility" preference. * **preferredCommitment** (*dict*) -- Sets the preferences for how Reserved Instances and Savings Plans cost-saving opportunities are prioritized in terms of payment option and term length. * **term** *(string) --* The preferred length of the commitment period. If the value is null, it will default to "ThreeYears" (highest savings) where applicable. * **paymentOption** *(string) --* The preferred upfront payment structure for commitments. If the value is null, it will default to "AllUpfront" (highest savings) where applicable. Return type: dict Returns: **Response Syntax** { 'savingsEstimationMode': 'BeforeDiscounts'|'AfterDiscounts', 'memberAccountDiscountVisibility': 'All'|'None', 'preferredCommitment': { 'term': 'OneYear'|'ThreeYears', 'paymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront' } } **Response Structure** * *(dict) --* * **savingsEstimationMode** *(string) --* Shows the status of the "savings estimation mode" preference. * **memberAccountDiscountVisibility** *(string) --* Shows the status of the "member account discount visibility" preference. * **preferredCommitment** *(dict) --* Shows the updated preferences for how Reserved Instances and Savings Plans cost-saving opportunities are prioritized in terms of payment option and term length. * **term** *(string) --* The preferred length of the commitment period. If the value is null, it will default to "ThreeYears" (highest savings) where applicable. * **paymentOption** *(string) --* The preferred upfront payment structure for commitments. If the value is null, it will default to "AllUpfront" (highest savings) where applicable. **Exceptions** * "CostOptimizationHub.Client.exceptions.ValidationException" * "CostOptimizationHub.Client.exceptions.InternalServerException" * "CostOptimizationHub.Client.exceptions.AccessDeniedException" * "CostOptimizationHub.Client.exceptions.ThrottlingException" CostOptimizationHub / Client / update_enrollment_status update_enrollment_status ************************ CostOptimizationHub.Client.update_enrollment_status(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.update_enrollment_status( status='Active'|'Inactive', includeMemberAccounts=True|False ) Parameters: * **status** (*string*) -- **[REQUIRED]** Sets the account status. * **includeMemberAccounts** (*boolean*) -- Indicates whether to enroll member accounts of the organization if the account is the management account or delegated administrator. Return type: dict Returns: **Response Syntax** { 'status': 'string' } **Response Structure** * *(dict) --* * **status** *(string) --* The enrollment status of the account. **Exceptions** * "CostOptimizationHub.Client.exceptions.ValidationException" * "CostOptimizationHub.Client.exceptions.InternalServerException" * "CostOptimizationHub.Client.exceptions.AccessDeniedException" * "CostOptimizationHub.Client.exceptions.ThrottlingException" CostOptimizationHub / Client / get_waiter get_waiter ********** CostOptimizationHub.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" CostOptimizationHub / Client / list_enrollment_statuses list_enrollment_statuses ************************ CostOptimizationHub.Client.list_enrollment_statuses(**kwargs) Retrieves the enrollment status for an account. It can also return the list of accounts that are enrolled under the organization. See also: AWS API Documentation **Request Syntax** response = client.list_enrollment_statuses( includeOrganizationInfo=True|False, accountId='string', nextToken='string', maxResults=123 ) Parameters: * **includeOrganizationInfo** (*boolean*) -- Indicates whether to return the enrollment status for the organization. * **accountId** (*string*) -- The account ID of a member account in the organization. * **nextToken** (*string*) -- The token to retrieve the next set of results. * **maxResults** (*integer*) -- The maximum number of objects that are returned for the request. Return type: dict Returns: **Response Syntax** { 'items': [ { 'accountId': 'string', 'status': 'Active'|'Inactive', 'lastUpdatedTimestamp': datetime(2015, 1, 1), 'createdTimestamp': datetime(2015, 1, 1) }, ], 'includeMemberAccounts': True|False, 'nextToken': 'string' } **Response Structure** * *(dict) --* * **items** *(list) --* The enrollment status of a specific account ID, including creation and last updated timestamps. * *(dict) --* Describes the enrollment status of an organization's member accounts in Cost Optimization Hub. * **accountId** *(string) --* The Amazon Web Services account ID. * **status** *(string) --* The account enrollment status. * **lastUpdatedTimestamp** *(datetime) --* The time when the account enrollment status was last updated. * **createdTimestamp** *(datetime) --* The time when the account enrollment status was created. * **includeMemberAccounts** *(boolean) --* The enrollment status of all member accounts in the organization if the account is the management account or delegated administrator. * **nextToken** *(string) --* The token to retrieve the next set of results. **Exceptions** * "CostOptimizationHub.Client.exceptions.ValidationException" * "CostOptimizationHub.Client.exceptions.InternalServerException" * "CostOptimizationHub.Client.exceptions.AccessDeniedException" * "CostOptimizationHub.Client.exceptions.ThrottlingException" CostOptimizationHub / Client / close close ***** CostOptimizationHub.Client.close() Closes underlying endpoint connections. CostOptimizationHub / Client / list_recommendations list_recommendations ******************** CostOptimizationHub.Client.list_recommendations(**kwargs) Returns a list of recommendations. See also: AWS API Documentation **Request Syntax** response = client.list_recommendations( filter={ 'restartNeeded': True|False, 'rollbackPossible': True|False, 'implementationEfforts': [ 'VeryLow'|'Low'|'Medium'|'High'|'VeryHigh', ], 'accountIds': [ 'string', ], 'regions': [ 'string', ], 'resourceTypes': [ 'Ec2Instance'|'LambdaFunction'|'EbsVolume'|'EcsService'|'Ec2AutoScalingGroup'|'Ec2InstanceSavingsPlans'|'ComputeSavingsPlans'|'SageMakerSavingsPlans'|'Ec2ReservedInstances'|'RdsReservedInstances'|'OpenSearchReservedInstances'|'RedshiftReservedInstances'|'ElastiCacheReservedInstances'|'RdsDbInstanceStorage'|'RdsDbInstance'|'AuroraDbClusterStorage'|'DynamoDbReservedCapacity'|'MemoryDbReservedInstances', ], 'actionTypes': [ 'Rightsize'|'Stop'|'Upgrade'|'PurchaseSavingsPlans'|'PurchaseReservedInstances'|'MigrateToGraviton'|'Delete'|'ScaleIn', ], 'tags': [ { 'key': 'string', 'value': 'string' }, ], 'resourceIds': [ 'string', ], 'resourceArns': [ 'string', ], 'recommendationIds': [ 'string', ] }, orderBy={ 'dimension': 'string', 'order': 'Asc'|'Desc' }, includeAllRecommendations=True|False, maxResults=123, nextToken='string' ) Parameters: * **filter** (*dict*) -- The constraints that you want all returned recommendations to match. * **restartNeeded** *(boolean) --* Whether or not implementing the recommendation requires a restart. * **rollbackPossible** *(boolean) --* Whether or not implementing the recommendation can be rolled back. * **implementationEfforts** *(list) --* The effort required to implement the recommendation. * *(string) --* * **accountIds** *(list) --* The account to which the recommendation applies. * *(string) --* * **regions** *(list) --* The Amazon Web Services Region of the resource. * *(string) --* * **resourceTypes** *(list) --* The resource type of the recommendation. * *(string) --* * **actionTypes** *(list) --* The type of action you can take by adopting the recommendation. * *(string) --* * **tags** *(list) --* A list of tags assigned to the recommendation. * *(dict) --* The tag structure that contains a tag key and value. * **key** *(string) --* The key that's associated with the tag. * **value** *(string) --* The value that's associated with the tag. * **resourceIds** *(list) --* The resource ID of the recommendation. * *(string) --* * **resourceArns** *(list) --* The Amazon Resource Name (ARN) of the recommendation. * *(string) --* * **recommendationIds** *(list) --* The IDs for the recommendations. * *(string) --* * **orderBy** (*dict*) -- The ordering of recommendations by a dimension. * **dimension** *(string) --* Sorts by dimension values. * **order** *(string) --* The order that's used to sort the data. * **includeAllRecommendations** (*boolean*) -- List of all recommendations for a resource, or a single recommendation if de-duped by "resourceId". * **maxResults** (*integer*) -- The maximum number of recommendations that are returned for the request. * **nextToken** (*string*) -- The token to retrieve the next set of results. Return type: dict Returns: **Response Syntax** { 'items': [ { 'recommendationId': 'string', 'accountId': 'string', 'region': 'string', 'resourceId': 'string', 'resourceArn': 'string', 'currentResourceType': 'string', 'recommendedResourceType': 'string', 'estimatedMonthlySavings': 123.0, 'estimatedSavingsPercentage': 123.0, 'estimatedMonthlyCost': 123.0, 'currencyCode': 'string', 'implementationEffort': 'string', 'restartNeeded': True|False, 'actionType': 'string', 'rollbackPossible': True|False, 'currentResourceSummary': 'string', 'recommendedResourceSummary': 'string', 'lastRefreshTimestamp': datetime(2015, 1, 1), 'recommendationLookbackPeriodInDays': 123, 'source': 'ComputeOptimizer'|'CostExplorer', 'tags': [ { 'key': 'string', 'value': 'string' }, ] }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **items** *(list) --* List of all savings recommendations. * *(dict) --* Describes a recommendation. * **recommendationId** *(string) --* The ID for the recommendation. * **accountId** *(string) --* The account to which the recommendation applies. * **region** *(string) --* The Amazon Web Services Region of the resource. * **resourceId** *(string) --* The resource ID for the recommendation. * **resourceArn** *(string) --* The Amazon Resource Name (ARN) for the recommendation. * **currentResourceType** *(string) --* The current resource type. * **recommendedResourceType** *(string) --* The recommended resource type. * **estimatedMonthlySavings** *(float) --* The estimated monthly savings amount for the recommendation. * **estimatedSavingsPercentage** *(float) --* The estimated savings percentage relative to the total cost over the cost calculation lookback period. * **estimatedMonthlyCost** *(float) --* The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage. * **currencyCode** *(string) --* The currency code used for the recommendation. * **implementationEffort** *(string) --* The effort required to implement the recommendation. * **restartNeeded** *(boolean) --* Whether or not implementing the recommendation requires a restart. * **actionType** *(string) --* The type of tasks that can be carried out by this action. * **rollbackPossible** *(boolean) --* Whether or not implementing the recommendation can be rolled back. * **currentResourceSummary** *(string) --* Describes the current resource. * **recommendedResourceSummary** *(string) --* Describes the recommended resource. * **lastRefreshTimestamp** *(datetime) --* The time when the recommendation was last generated. * **recommendationLookbackPeriodInDays** *(integer) --* The lookback period that's used to generate the recommendation. * **source** *(string) --* The source of the recommendation. * **tags** *(list) --* A list of tags assigned to the recommendation. * *(dict) --* The tag structure that contains a tag key and value. * **key** *(string) --* The key that's associated with the tag. * **value** *(string) --* The value that's associated with the tag. * **nextToken** *(string) --* The token to retrieve the next set of results. **Exceptions** * "CostOptimizationHub.Client.exceptions.ValidationException" * "CostOptimizationHub.Client.exceptions.InternalServerException" * "CostOptimizationHub.Client.exceptions.AccessDeniedException" * "CostOptimizationHub.Client.exceptions.ThrottlingException" CostOptimizationHub / Client / get_recommendation get_recommendation ****************** CostOptimizationHub.Client.get_recommendation(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.get_recommendation( recommendationId='string' ) Parameters: **recommendationId** (*string*) -- **[REQUIRED]** The ID for the recommendation. Return type: dict Returns: **Response Syntax** { 'recommendationId': 'string', 'resourceId': 'string', 'resourceArn': 'string', 'accountId': 'string', 'currencyCode': 'string', 'recommendationLookbackPeriodInDays': 123, 'costCalculationLookbackPeriodInDays': 123, 'estimatedSavingsPercentage': 123.0, 'estimatedSavingsOverCostCalculationLookbackPeriod': 123.0, 'currentResourceType': 'Ec2Instance'|'LambdaFunction'|'EbsVolume'|'EcsService'|'Ec2AutoScalingGroup'|'Ec2InstanceSavingsPlans'|'ComputeSavingsPlans'|'SageMakerSavingsPlans'|'Ec2ReservedInstances'|'RdsReservedInstances'|'OpenSearchReservedInstances'|'RedshiftReservedInstances'|'ElastiCacheReservedInstances'|'RdsDbInstanceStorage'|'RdsDbInstance'|'AuroraDbClusterStorage'|'DynamoDbReservedCapacity'|'MemoryDbReservedInstances', 'recommendedResourceType': 'Ec2Instance'|'LambdaFunction'|'EbsVolume'|'EcsService'|'Ec2AutoScalingGroup'|'Ec2InstanceSavingsPlans'|'ComputeSavingsPlans'|'SageMakerSavingsPlans'|'Ec2ReservedInstances'|'RdsReservedInstances'|'OpenSearchReservedInstances'|'RedshiftReservedInstances'|'ElastiCacheReservedInstances'|'RdsDbInstanceStorage'|'RdsDbInstance'|'AuroraDbClusterStorage'|'DynamoDbReservedCapacity'|'MemoryDbReservedInstances', 'region': 'string', 'source': 'ComputeOptimizer'|'CostExplorer', 'lastRefreshTimestamp': datetime(2015, 1, 1), 'estimatedMonthlySavings': 123.0, 'estimatedMonthlyCost': 123.0, 'implementationEffort': 'VeryLow'|'Low'|'Medium'|'High'|'VeryHigh', 'restartNeeded': True|False, 'actionType': 'Rightsize'|'Stop'|'Upgrade'|'PurchaseSavingsPlans'|'PurchaseReservedInstances'|'MigrateToGraviton'|'Delete'|'ScaleIn', 'rollbackPossible': True|False, 'currentResourceDetails': { 'lambdaFunction': { 'configuration': { 'compute': { 'vCpu': 123.0, 'memorySizeInMB': 123, 'architecture': 'string', 'platform': 'string' } }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'ecsService': { 'configuration': { 'compute': { 'vCpu': 123.0, 'memorySizeInMB': 123, 'architecture': 'string', 'platform': 'string' } }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'ec2Instance': { 'configuration': { 'instance': { 'type': 'string' } }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'ebsVolume': { 'configuration': { 'storage': { 'type': 'string', 'sizeInGb': 123.0 }, 'performance': { 'iops': 123.0, 'throughput': 123.0 }, 'attachmentState': 'string' }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'ec2AutoScalingGroup': { 'configuration': { 'instance': { 'type': 'string' }, 'mixedInstances': [ { 'type': 'string' }, ], 'type': 'SingleInstanceType'|'MixedInstanceTypes', 'allocationStrategy': 'Prioritized'|'LowestPrice' }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'ec2ReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'offeringClass': 'string', 'instanceFamily': 'string', 'instanceType': 'string', 'currentGeneration': 'string', 'platform': 'string', 'tenancy': 'string', 'sizeFlexEligible': True|False }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'rdsReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'instanceFamily': 'string', 'instanceType': 'string', 'sizeFlexEligible': True|False, 'currentGeneration': 'string', 'licenseModel': 'string', 'databaseEdition': 'string', 'databaseEngine': 'string', 'deploymentOption': 'string' }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'elastiCacheReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'instanceFamily': 'string', 'instanceType': 'string', 'currentGeneration': 'string', 'sizeFlexEligible': True|False }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'openSearchReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'instanceType': 'string', 'currentGeneration': 'string', 'sizeFlexEligible': True|False }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'redshiftReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'instanceFamily': 'string', 'instanceType': 'string', 'sizeFlexEligible': True|False, 'currentGeneration': 'string' }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'ec2InstanceSavingsPlans': { 'configuration': { 'accountScope': 'string', 'term': 'string', 'paymentOption': 'string', 'hourlyCommitment': 'string', 'instanceFamily': 'string', 'savingsPlansRegion': 'string' }, 'costCalculation': { 'pricing': { 'monthlySavingsPlansEligibleCost': 123.0, 'estimatedMonthlyCommitment': 123.0, 'savingsPercentage': 123.0, 'estimatedOnDemandCost': 123.0 } } }, 'computeSavingsPlans': { 'configuration': { 'accountScope': 'string', 'term': 'string', 'paymentOption': 'string', 'hourlyCommitment': 'string' }, 'costCalculation': { 'pricing': { 'monthlySavingsPlansEligibleCost': 123.0, 'estimatedMonthlyCommitment': 123.0, 'savingsPercentage': 123.0, 'estimatedOnDemandCost': 123.0 } } }, 'sageMakerSavingsPlans': { 'configuration': { 'accountScope': 'string', 'term': 'string', 'paymentOption': 'string', 'hourlyCommitment': 'string' }, 'costCalculation': { 'pricing': { 'monthlySavingsPlansEligibleCost': 123.0, 'estimatedMonthlyCommitment': 123.0, 'savingsPercentage': 123.0, 'estimatedOnDemandCost': 123.0 } } }, 'rdsDbInstance': { 'configuration': { 'instance': { 'dbInstanceClass': 'string' } }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'rdsDbInstanceStorage': { 'configuration': { 'storageType': 'string', 'allocatedStorageInGb': 123.0, 'iops': 123.0, 'storageThroughput': 123.0 }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'auroraDbClusterStorage': { 'configuration': { 'storageType': 'string' }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'dynamoDbReservedCapacity': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'numberOfCapacityUnitsToPurchase': 'string', 'capacityUnits': 'string' }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'memoryDbReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'instanceType': 'string', 'instanceFamily': 'string', 'sizeFlexEligible': True|False, 'currentGeneration': 'string' }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } } }, 'recommendedResourceDetails': { 'lambdaFunction': { 'configuration': { 'compute': { 'vCpu': 123.0, 'memorySizeInMB': 123, 'architecture': 'string', 'platform': 'string' } }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'ecsService': { 'configuration': { 'compute': { 'vCpu': 123.0, 'memorySizeInMB': 123, 'architecture': 'string', 'platform': 'string' } }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'ec2Instance': { 'configuration': { 'instance': { 'type': 'string' } }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'ebsVolume': { 'configuration': { 'storage': { 'type': 'string', 'sizeInGb': 123.0 }, 'performance': { 'iops': 123.0, 'throughput': 123.0 }, 'attachmentState': 'string' }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'ec2AutoScalingGroup': { 'configuration': { 'instance': { 'type': 'string' }, 'mixedInstances': [ { 'type': 'string' }, ], 'type': 'SingleInstanceType'|'MixedInstanceTypes', 'allocationStrategy': 'Prioritized'|'LowestPrice' }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'ec2ReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'offeringClass': 'string', 'instanceFamily': 'string', 'instanceType': 'string', 'currentGeneration': 'string', 'platform': 'string', 'tenancy': 'string', 'sizeFlexEligible': True|False }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'rdsReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'instanceFamily': 'string', 'instanceType': 'string', 'sizeFlexEligible': True|False, 'currentGeneration': 'string', 'licenseModel': 'string', 'databaseEdition': 'string', 'databaseEngine': 'string', 'deploymentOption': 'string' }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'elastiCacheReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'instanceFamily': 'string', 'instanceType': 'string', 'currentGeneration': 'string', 'sizeFlexEligible': True|False }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'openSearchReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'instanceType': 'string', 'currentGeneration': 'string', 'sizeFlexEligible': True|False }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'redshiftReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'instanceFamily': 'string', 'instanceType': 'string', 'sizeFlexEligible': True|False, 'currentGeneration': 'string' }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'ec2InstanceSavingsPlans': { 'configuration': { 'accountScope': 'string', 'term': 'string', 'paymentOption': 'string', 'hourlyCommitment': 'string', 'instanceFamily': 'string', 'savingsPlansRegion': 'string' }, 'costCalculation': { 'pricing': { 'monthlySavingsPlansEligibleCost': 123.0, 'estimatedMonthlyCommitment': 123.0, 'savingsPercentage': 123.0, 'estimatedOnDemandCost': 123.0 } } }, 'computeSavingsPlans': { 'configuration': { 'accountScope': 'string', 'term': 'string', 'paymentOption': 'string', 'hourlyCommitment': 'string' }, 'costCalculation': { 'pricing': { 'monthlySavingsPlansEligibleCost': 123.0, 'estimatedMonthlyCommitment': 123.0, 'savingsPercentage': 123.0, 'estimatedOnDemandCost': 123.0 } } }, 'sageMakerSavingsPlans': { 'configuration': { 'accountScope': 'string', 'term': 'string', 'paymentOption': 'string', 'hourlyCommitment': 'string' }, 'costCalculation': { 'pricing': { 'monthlySavingsPlansEligibleCost': 123.0, 'estimatedMonthlyCommitment': 123.0, 'savingsPercentage': 123.0, 'estimatedOnDemandCost': 123.0 } } }, 'rdsDbInstance': { 'configuration': { 'instance': { 'dbInstanceClass': 'string' } }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'rdsDbInstanceStorage': { 'configuration': { 'storageType': 'string', 'allocatedStorageInGb': 123.0, 'iops': 123.0, 'storageThroughput': 123.0 }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'auroraDbClusterStorage': { 'configuration': { 'storageType': 'string' }, 'costCalculation': { 'usages': [ { 'usageType': 'string', 'usageAmount': 123.0, 'operation': 'string', 'productCode': 'string', 'unit': 'string' }, ], 'pricing': { 'estimatedCostBeforeDiscounts': 123.0, 'estimatedNetUnusedAmortizedCommitments': 123.0, 'estimatedDiscounts': { 'savingsPlansDiscount': 123.0, 'reservedInstancesDiscount': 123.0, 'otherDiscount': 123.0 }, 'estimatedCostAfterDiscounts': 123.0 } } }, 'dynamoDbReservedCapacity': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'numberOfCapacityUnitsToPurchase': 'string', 'capacityUnits': 'string' }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } }, 'memoryDbReservedInstances': { 'configuration': { 'accountScope': 'string', 'service': 'string', 'term': 'string', 'paymentOption': 'string', 'reservedInstancesRegion': 'string', 'upfrontCost': 'string', 'monthlyRecurringCost': 'string', 'normalizedUnitsToPurchase': 'string', 'numberOfInstancesToPurchase': 'string', 'instanceType': 'string', 'instanceFamily': 'string', 'sizeFlexEligible': True|False, 'currentGeneration': 'string' }, 'costCalculation': { 'pricing': { 'estimatedOnDemandCost': 123.0, 'monthlyReservationEligibleCost': 123.0, 'savingsPercentage': 123.0, 'estimatedMonthlyAmortizedReservationCost': 123.0 } } } }, 'tags': [ { 'key': 'string', 'value': 'string' }, ] } **Response Structure** # This section is too large to render. # Please see the AWS API Documentation linked below. AWS API Documentation **Exceptions** * "CostOptimizationHub.Client.exceptions.ValidationException" * "CostOptimizationHub.Client.exceptions.InternalServerException" * "CostOptimizationHub.Client.exceptions.AccessDeniedException" * "CostOptimizationHub.Client.exceptions.ResourceNotFoundException" * "CostOptimizationHub.Client.exceptions.ThrottlingException"