From 82ea670c8df1aa3fc00ca872c1105c9fbf59a678 Mon Sep 17 00:00:00 2001
From: awstools 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 of an organization, this action can also be used to
- * enroll member accounts of the organization. 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. The enrollment status of all member accounts in the organization if the account is the
- * management account.
The maximum number of recommendations that are returned for the request.
+ *The maximum number of recommendations to be returned for the request.
* @public */ maxResults?: number; + /** + *Additional metrics to be returned for the request. The only valid value is
+ * savingsPercentage
.
The token to retrieve the next set of results.
* @public @@ -2591,6 +2611,24 @@ export interface RecommendationSummary { recommendationCount?: number; } +/** + *The results or descriptions for the additional metrics, based on whether the metrics were + * or were not requested.
+ * @public + */ +export interface SummaryMetricsResult { + /** + *The savings percentage based on your Amazon Web Services spend over the past 30 + * days.
+ *Savings percentage is only supported when filtering by Region, account ID, or + * tags.
+ *List of all savings recommendations.
+ *A list of all savings recommendations.
* @public */ items?: RecommendationSummary[]; @@ -2619,6 +2657,13 @@ export interface ListRecommendationSummariesResponse { */ currencyCode?: string; + /** + *The results or descriptions for the additional metrics, based on whether the metrics were + * or were not requested.
+ * @public + */ + metrics?: SummaryMetricsResult; + /** *The token to retrieve the next set of results.
* @public @@ -2638,7 +2683,7 @@ export interface UpdateEnrollmentStatusRequest { /** *Indicates whether to enroll member accounts of the organization if the account is the - * management account.
+ * management account or delegated administrator. * @public */ includeMemberAccounts?: boolean; diff --git a/clients/client-cost-optimization-hub/src/protocols/Aws_json1_0.ts b/clients/client-cost-optimization-hub/src/protocols/Aws_json1_0.ts index b93e4a365bf3e..aaa95eefd7dcd 100644 --- a/clients/client-cost-optimization-hub/src/protocols/Aws_json1_0.ts +++ b/clients/client-cost-optimization-hub/src/protocols/Aws_json1_0.ts @@ -98,6 +98,7 @@ import { SavingsPlansCostCalculation, SavingsPlansPricing, StorageConfiguration, + SummaryMetrics, Tag, ThrottlingException, UpdateEnrollmentStatusRequest, @@ -476,6 +477,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_ResourceTypeList omitted. +// se_SummaryMetricsList omitted. + // se_Tag omitted. // se_TagList omitted. @@ -749,6 +752,7 @@ const de_ListRecommendationSummariesResponse = ( estimatedTotalDedupedSavings: __limitedParseDouble, groupBy: __expectString, items: (_: any) => de_RecommendationSummariesList(_, context), + metrics: _json, nextToken: __expectString, }) as any; }; @@ -1063,6 +1067,8 @@ const de_StorageConfiguration = (output: any, context: __SerdeContext): StorageC }) as any; }; +// de_SummaryMetricsResult omitted. + // de_Tag omitted. // de_TagList omitted. diff --git a/codegen/sdk-codegen/aws-models/cost-optimization-hub.json b/codegen/sdk-codegen/aws-models/cost-optimization-hub.json index 53d322bf16094..80143b476d21f 100644 --- a/codegen/sdk-codegen/aws-models/cost-optimization-hub.json +++ b/codegen/sdk-codegen/aws-models/cost-optimization-hub.json @@ -1943,7 +1943,7 @@ "includeMemberAccounts": { "target": "smithy.api#Boolean", "traits": { - "smithy.api#documentation": "The enrollment status of all member accounts in the organization if the account is the\n management account.
" + "smithy.api#documentation": "The enrollment status of all member accounts in the organization if the account is the\n management account or delegated administrator.
" } }, "nextToken": { @@ -2006,13 +2006,20 @@ "maxResults": { "target": "com.amazonaws.costoptimizationhub#MaxResults", "traits": { - "smithy.api#documentation": "The maximum number of recommendations that are returned for the request.
", + "smithy.api#documentation": "The maximum number of recommendations to be returned for the request.
", "smithy.api#range": { "min": 0, "max": 1000 } } }, + "metrics": { + "target": "com.amazonaws.costoptimizationhub#SummaryMetricsList", + "traits": { + "smithy.api#documentation": "Additional metrics to be returned for the request. The only valid value is\n savingsPercentage
.
List of all savings recommendations.
" + "smithy.api#documentation": "A list of all savings recommendations.
" } }, "groupBy": { @@ -2051,6 +2058,13 @@ "smithy.api#documentation": "The currency code used for the recommendation.
" } }, + "metrics": { + "target": "com.amazonaws.costoptimizationhub#SummaryMetricsResult", + "traits": { + "smithy.api#documentation": "The results or descriptions for the additional metrics, based on whether the metrics were\n or were not requested.
", + "smithy.api#tags": ["delegatedAdmin"] + } + }, "nextToken": { "target": "smithy.api#String", "traits": { @@ -3341,6 +3355,43 @@ "smithy.api#documentation": "The storage configuration used for recommendations.
" } }, + "com.amazonaws.costoptimizationhub#SummaryMetrics": { + "type": "enum", + "members": { + "SAVINGS_PERCENTAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SavingsPercentage" + } + } + } + }, + "com.amazonaws.costoptimizationhub#SummaryMetricsList": { + "type": "list", + "member": { + "target": "com.amazonaws.costoptimizationhub#SummaryMetrics" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.costoptimizationhub#SummaryMetricsResult": { + "type": "structure", + "members": { + "savingsPercentage": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The savings percentage based on your Amazon Web Services spend over the past 30\n days.
\nSavings percentage is only supported when filtering by Region, account ID, or\n tags.
\nThe results or descriptions for the additional metrics, based on whether the metrics were\n or were not requested.
" + } + }, "com.amazonaws.costoptimizationhub#Tag": { "type": "structure", "members": { @@ -3409,7 +3460,7 @@ } ], "traits": { - "smithy.api#documentation": "Updates the enrollment (opt in and opt out) status of an account to the Cost Optimization\n Hub service.
\nIf the account is a management account of an organization, this action can also be used to\n enroll member accounts of the organization.
\nYou must have the appropriate permissions to opt in to Cost Optimization Hub and to view\n its recommendations. When you opt in, Cost Optimization Hub automatically creates a\n service-linked role in your account to access its data.
" + "smithy.api#documentation": "Updates the enrollment (opt in and opt out) status of an account to the Cost Optimization\n Hub service.
\nIf the account is a management account or delegated administrator of an organization, this\n action can also be used to enroll member accounts of the organization.
\nYou must have the appropriate permissions to opt in to Cost Optimization Hub and to view\n its recommendations. When you opt in, Cost Optimization Hub automatically creates a\n service-linked role in your account to access its data.
" } }, "com.amazonaws.costoptimizationhub#UpdateEnrollmentStatusRequest": { @@ -3425,7 +3476,7 @@ "includeMemberAccounts": { "target": "smithy.api#Boolean", "traits": { - "smithy.api#documentation": "Indicates whether to enroll member accounts of the organization if the account is the\n management account.
" + "smithy.api#documentation": "Indicates whether to enroll member accounts of the organization if the account is the\n management account or delegated administrator.
" } } },