@aws-sdk/client-compute-optimizer 3.398.0 → 3.405.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/ComputeOptimizer.js +4 -0
  3. package/dist-cjs/commands/ExportLicenseRecommendationsCommand.js +46 -0
  4. package/dist-cjs/commands/GetLicenseRecommendationsCommand.js +46 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/endpoint/ruleset.js +1 -1
  7. package/dist-cjs/models/models_0.js +59 -2
  8. package/dist-cjs/protocols/Aws_json1_0.js +168 -1
  9. package/dist-es/ComputeOptimizer.js +4 -0
  10. package/dist-es/commands/ExportLicenseRecommendationsCommand.js +42 -0
  11. package/dist-es/commands/GetLicenseRecommendationsCommand.js +42 -0
  12. package/dist-es/commands/index.js +2 -0
  13. package/dist-es/endpoint/ruleset.js +1 -1
  14. package/dist-es/models/models_0.js +57 -0
  15. package/dist-es/protocols/Aws_json1_0.js +163 -0
  16. package/dist-types/ComputeOptimizer.d.ts +14 -0
  17. package/dist-types/ComputeOptimizerClient.d.ts +4 -2
  18. package/dist-types/commands/DeleteRecommendationPreferencesCommand.d.ts +1 -1
  19. package/dist-types/commands/DescribeRecommendationExportJobsCommand.d.ts +1 -1
  20. package/dist-types/commands/ExportLicenseRecommendationsCommand.d.ts +129 -0
  21. package/dist-types/commands/GetEC2InstanceRecommendationsCommand.d.ts +1 -1
  22. package/dist-types/commands/GetLicenseRecommendationsCommand.d.ts +172 -0
  23. package/dist-types/commands/GetRecommendationPreferencesCommand.d.ts +2 -2
  24. package/dist-types/commands/GetRecommendationSummariesCommand.d.ts +1 -1
  25. package/dist-types/commands/PutRecommendationPreferencesCommand.d.ts +1 -1
  26. package/dist-types/commands/index.d.ts +2 -0
  27. package/dist-types/models/models_0.d.ts +591 -0
  28. package/dist-types/protocols/Aws_json1_0.d.ts +18 -0
  29. package/dist-types/ts3.4/ComputeOptimizer.d.ts +34 -0
  30. package/dist-types/ts3.4/ComputeOptimizerClient.d.ts +12 -0
  31. package/dist-types/ts3.4/commands/ExportLicenseRecommendationsCommand.d.ts +42 -0
  32. package/dist-types/ts3.4/commands/GetLicenseRecommendationsCommand.d.ts +42 -0
  33. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  34. package/dist-types/ts3.4/models/models_0.d.ts +131 -0
  35. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +24 -0
  36. package/package.json +7 -7
@@ -5,6 +5,7 @@ export * from "./ExportEBSVolumeRecommendationsCommand";
5
5
  export * from "./ExportEC2InstanceRecommendationsCommand";
6
6
  export * from "./ExportECSServiceRecommendationsCommand";
7
7
  export * from "./ExportLambdaFunctionRecommendationsCommand";
8
+ export * from "./ExportLicenseRecommendationsCommand";
8
9
  export * from "./GetAutoScalingGroupRecommendationsCommand";
9
10
  export * from "./GetEBSVolumeRecommendationsCommand";
10
11
  export * from "./GetEC2InstanceRecommendationsCommand";
@@ -15,6 +16,7 @@ export * from "./GetEffectiveRecommendationPreferencesCommand";
15
16
  export * from "./GetEnrollmentStatusCommand";
16
17
  export * from "./GetEnrollmentStatusesForOrganizationCommand";
17
18
  export * from "./GetLambdaFunctionRecommendationsCommand";
19
+ export * from "./GetLicenseRecommendationsCommand";
18
20
  export * from "./GetRecommendationPreferencesCommand";
19
21
  export * from "./GetRecommendationSummariesCommand";
20
22
  export * from "./PutRecommendationPreferencesCommand";
@@ -1,4 +1,4 @@
1
1
  const q = "required", r = "fn", s = "argv", t = "ref";
2
2
  const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
3
- const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://compute-optimizer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://compute-optimizer-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://compute-optimizer.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://compute-optimizer.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
3
+ const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }, { conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ endpoint: { url: "https://compute-optimizer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://compute-optimizer-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ endpoint: { url: "https://compute-optimizer.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://compute-optimizer.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] };
4
4
  export const ruleSet = _data;
@@ -103,6 +103,7 @@ export const ResourceType = {
103
103
  EC2_INSTANCE: "Ec2Instance",
104
104
  ECS_SERVICE: "EcsService",
105
105
  LAMBDA_FUNCTION: "LambdaFunction",
106
+ LICENSE: "License",
106
107
  NOT_APPLICABLE: "NotApplicable",
107
108
  };
108
109
  export const ScopeName = {
@@ -438,6 +439,34 @@ export const LambdaFunctionRecommendationFilterName = {
438
439
  FINDING: "Finding",
439
440
  FINDING_REASON_CODE: "FindingReasonCode",
440
441
  };
442
+ export const ExportableLicenseField = {
443
+ ACCOUNT_ID: "AccountId",
444
+ CURRENT_LICENSE_CONFIGURATION_INSTANCE_TYPE: "CurrentLicenseConfigurationInstanceType",
445
+ CURRENT_LICENSE_CONFIGURATION_LICENSE_EDITION: "CurrentLicenseConfigurationLicenseEdition",
446
+ CURRENT_LICENSE_CONFIGURATION_LICENSE_MODEL: "CurrentLicenseConfigurationLicenseModel",
447
+ CURRENT_LICENSE_CONFIGURATION_LICENSE_NAME: "CurrentLicenseConfigurationLicenseName",
448
+ CURRENT_LICENSE_CONFIGURATION_LICENSE_VERSION: "CurrentLicenseConfigurationLicenseVersion",
449
+ CURRENT_LICENSE_CONFIGURATION_METRICS_SOURCE: "CurrentLicenseConfigurationMetricsSource",
450
+ CURRENT_LICENSE_CONFIGURATION_NUMBER_OF_CORES: "CurrentLicenseConfigurationNumberOfCores",
451
+ CURRENT_LICENSE_CONFIGURATION_OPERATING_SYSTEM: "CurrentLicenseConfigurationOperatingSystem",
452
+ LAST_REFRESH_TIMESTAMP: "LastRefreshTimestamp",
453
+ LICENSE_FINDING: "Finding",
454
+ LICENSE_FINDING_REASON_CODES: "FindingReasonCodes",
455
+ LOOKBACK_PERIOD_IN_DAYS: "LookbackPeriodInDays",
456
+ RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_CURRENCY: "RecommendationOptionsEstimatedMonthlySavingsCurrency",
457
+ RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_VALUE: "RecommendationOptionsEstimatedMonthlySavingsValue",
458
+ RECOMMENDATION_OPTIONS_LICENSE_EDITION: "RecommendationOptionsLicenseEdition",
459
+ RECOMMENDATION_OPTIONS_LICENSE_MODEL: "RecommendationOptionsLicenseModel",
460
+ RECOMMENDATION_OPTIONS_OPERATING_SYSTEM: "RecommendationOptionsOperatingSystem",
461
+ RECOMMENDATION_OPTIONS_SAVINGS_OPPORTUNITY_PERCENTAGE: "RecommendationOptionsSavingsOpportunityPercentage",
462
+ RESOURCE_ARN: "ResourceArn",
463
+ TAGS: "Tags",
464
+ };
465
+ export const LicenseRecommendationFilterName = {
466
+ LICENSE_FINDING: "Finding",
467
+ LICENSE_FINDING_REASON_CODE: "FindingReasonCode",
468
+ LICENSE_NAME: "LicenseName",
469
+ };
441
470
  export const EBSFinding = {
442
471
  NOT_OPTIMIZED: "NotOptimized",
443
472
  OPTIMIZED: "Optimized",
@@ -500,6 +529,7 @@ export const RecommendationSourceType = {
500
529
  EC2_INSTANCE: "Ec2Instance",
501
530
  ECS_SERVICE: "EcsService",
502
531
  LAMBDA_FUNCTION: "LambdaFunction",
532
+ LICENSE: "License",
503
533
  };
504
534
  export const ECSServiceMetricName = {
505
535
  CPU: "Cpu",
@@ -554,6 +584,33 @@ export const LambdaFunctionMetricStatistic = {
554
584
  AVERAGE: "Average",
555
585
  MAXIMUM: "Maximum",
556
586
  };
587
+ export const LicenseEdition = {
588
+ ENTERPRISE: "Enterprise",
589
+ FREE: "Free",
590
+ NO_LICENSE_EDITION_FOUND: "NoLicenseEditionFound",
591
+ STANDARD: "Standard",
592
+ };
593
+ export const LicenseModel = {
594
+ BRING_YOUR_OWN_LICENSE: "BringYourOwnLicense",
595
+ LICENSE_INCLUDED: "LicenseIncluded",
596
+ };
597
+ export const LicenseName = {
598
+ SQLSERVER: "SQLServer",
599
+ };
600
+ export const MetricSourceProvider = {
601
+ CloudWatchAppInsights: "CloudWatchApplicationInsights",
602
+ };
603
+ export const LicenseFinding = {
604
+ INSUFFICIENT_METRICS: "InsufficientMetrics",
605
+ NOT_OPTIMIZED: "NotOptimized",
606
+ OPTIMIZED: "Optimized",
607
+ };
608
+ export const LicenseFindingReasonCode = {
609
+ CW_APP_INSIGHTS_DISABLED: "InvalidCloudWatchApplicationInsightsSetup",
610
+ CW_APP_INSIGHTS_ERROR: "CloudWatchApplicationInsightsError",
611
+ LICENSE_OVER_PROVISIONED: "LicenseOverprovisioned",
612
+ OPTIMIZED: "Optimized",
613
+ };
557
614
  export const FindingReasonCode = {
558
615
  MEMORY_OVER_PROVISIONED: "MemoryOverprovisioned",
559
616
  MEMORY_UNDER_PROVISIONED: "MemoryUnderprovisioned",
@@ -44,6 +44,12 @@ export const se_ExportLambdaFunctionRecommendationsCommand = async (input, conte
44
44
  body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
+ export const se_ExportLicenseRecommendationsCommand = async (input, context) => {
48
+ const headers = sharedHeaders("ExportLicenseRecommendations");
49
+ let body;
50
+ body = JSON.stringify(_json(input));
51
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
+ };
47
53
  export const se_GetAutoScalingGroupRecommendationsCommand = async (input, context) => {
48
54
  const headers = sharedHeaders("GetAutoScalingGroupRecommendations");
49
55
  let body;
@@ -104,6 +110,12 @@ export const se_GetLambdaFunctionRecommendationsCommand = async (input, context)
104
110
  body = JSON.stringify(_json(input));
105
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
112
  };
113
+ export const se_GetLicenseRecommendationsCommand = async (input, context) => {
114
+ const headers = sharedHeaders("GetLicenseRecommendations");
115
+ let body;
116
+ body = JSON.stringify(_json(input));
117
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
+ };
107
119
  export const se_GetRecommendationPreferencesCommand = async (input, context) => {
108
120
  const headers = sharedHeaders("GetRecommendationPreferences");
109
121
  let body;
@@ -499,6 +511,59 @@ const de_ExportLambdaFunctionRecommendationsCommandError = async (output, contex
499
511
  });
500
512
  }
501
513
  };
514
+ export const de_ExportLicenseRecommendationsCommand = async (output, context) => {
515
+ if (output.statusCode >= 300) {
516
+ return de_ExportLicenseRecommendationsCommandError(output, context);
517
+ }
518
+ const data = await parseBody(output.body, context);
519
+ let contents = {};
520
+ contents = _json(data);
521
+ const response = {
522
+ $metadata: deserializeMetadata(output),
523
+ ...contents,
524
+ };
525
+ return response;
526
+ };
527
+ const de_ExportLicenseRecommendationsCommandError = async (output, context) => {
528
+ const parsedOutput = {
529
+ ...output,
530
+ body: await parseErrorBody(output.body, context),
531
+ };
532
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
533
+ switch (errorCode) {
534
+ case "AccessDeniedException":
535
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
536
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
537
+ case "InternalServerException":
538
+ case "com.amazonaws.computeoptimizer#InternalServerException":
539
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
540
+ case "InvalidParameterValueException":
541
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
542
+ throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
543
+ case "LimitExceededException":
544
+ case "com.amazonaws.computeoptimizer#LimitExceededException":
545
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
546
+ case "MissingAuthenticationToken":
547
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
548
+ throw await de_MissingAuthenticationTokenRes(parsedOutput, context);
549
+ case "OptInRequiredException":
550
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
551
+ throw await de_OptInRequiredExceptionRes(parsedOutput, context);
552
+ case "ServiceUnavailableException":
553
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
554
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
555
+ case "ThrottlingException":
556
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
557
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
558
+ default:
559
+ const parsedBody = parsedOutput.body;
560
+ return throwDefaultError({
561
+ output,
562
+ parsedBody,
563
+ errorCode,
564
+ });
565
+ }
566
+ };
502
567
  export const de_GetAutoScalingGroupRecommendationsCommand = async (output, context) => {
503
568
  if (output.statusCode >= 300) {
504
569
  return de_GetAutoScalingGroupRecommendationsCommandError(output, context);
@@ -1017,6 +1082,59 @@ const de_GetLambdaFunctionRecommendationsCommandError = async (output, context)
1017
1082
  });
1018
1083
  }
1019
1084
  };
1085
+ export const de_GetLicenseRecommendationsCommand = async (output, context) => {
1086
+ if (output.statusCode >= 300) {
1087
+ return de_GetLicenseRecommendationsCommandError(output, context);
1088
+ }
1089
+ const data = await parseBody(output.body, context);
1090
+ let contents = {};
1091
+ contents = de_GetLicenseRecommendationsResponse(data, context);
1092
+ const response = {
1093
+ $metadata: deserializeMetadata(output),
1094
+ ...contents,
1095
+ };
1096
+ return response;
1097
+ };
1098
+ const de_GetLicenseRecommendationsCommandError = async (output, context) => {
1099
+ const parsedOutput = {
1100
+ ...output,
1101
+ body: await parseErrorBody(output.body, context),
1102
+ };
1103
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1104
+ switch (errorCode) {
1105
+ case "AccessDeniedException":
1106
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
1107
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1108
+ case "InternalServerException":
1109
+ case "com.amazonaws.computeoptimizer#InternalServerException":
1110
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1111
+ case "InvalidParameterValueException":
1112
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
1113
+ throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1114
+ case "MissingAuthenticationToken":
1115
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
1116
+ throw await de_MissingAuthenticationTokenRes(parsedOutput, context);
1117
+ case "OptInRequiredException":
1118
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
1119
+ throw await de_OptInRequiredExceptionRes(parsedOutput, context);
1120
+ case "ResourceNotFoundException":
1121
+ case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
1122
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1123
+ case "ServiceUnavailableException":
1124
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
1125
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1126
+ case "ThrottlingException":
1127
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
1128
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1129
+ default:
1130
+ const parsedBody = parsedOutput.body;
1131
+ return throwDefaultError({
1132
+ output,
1133
+ parsedBody,
1134
+ errorCode,
1135
+ });
1136
+ }
1137
+ };
1020
1138
  export const de_GetRecommendationPreferencesCommand = async (output, context) => {
1021
1139
  if (output.statusCode >= 300) {
1022
1140
  return de_GetRecommendationPreferencesCommandError(output, context);
@@ -1567,6 +1685,13 @@ const de_GetLambdaFunctionRecommendationsResponse = (output, context) => {
1567
1685
  nextToken: __expectString,
1568
1686
  });
1569
1687
  };
1688
+ const de_GetLicenseRecommendationsResponse = (output, context) => {
1689
+ return take(output, {
1690
+ errors: _json,
1691
+ licenseRecommendations: (_) => de_LicenseRecommendations(_, context),
1692
+ nextToken: __expectString,
1693
+ });
1694
+ };
1570
1695
  const de_GetRecommendationSummariesResponse = (output, context) => {
1571
1696
  return take(output, {
1572
1697
  nextToken: __expectString,
@@ -1698,6 +1823,44 @@ const de_LambdaFunctionUtilizationMetrics = (output, context) => {
1698
1823
  });
1699
1824
  return retVal;
1700
1825
  };
1826
+ const de_LicenseRecommendation = (output, context) => {
1827
+ return take(output, {
1828
+ accountId: __expectString,
1829
+ currentLicenseConfiguration: _json,
1830
+ finding: __expectString,
1831
+ findingReasonCodes: _json,
1832
+ lastRefreshTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1833
+ licenseRecommendationOptions: (_) => de_LicenseRecommendationOptions(_, context),
1834
+ lookbackPeriodInDays: __limitedParseDouble,
1835
+ resourceArn: __expectString,
1836
+ tags: _json,
1837
+ });
1838
+ };
1839
+ const de_LicenseRecommendationOption = (output, context) => {
1840
+ return take(output, {
1841
+ licenseEdition: __expectString,
1842
+ licenseModel: __expectString,
1843
+ operatingSystem: __expectString,
1844
+ rank: __expectInt32,
1845
+ savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1846
+ });
1847
+ };
1848
+ const de_LicenseRecommendationOptions = (output, context) => {
1849
+ const retVal = (output || [])
1850
+ .filter((e) => e != null)
1851
+ .map((entry) => {
1852
+ return de_LicenseRecommendationOption(entry, context);
1853
+ });
1854
+ return retVal;
1855
+ };
1856
+ const de_LicenseRecommendations = (output, context) => {
1857
+ const retVal = (output || [])
1858
+ .filter((e) => e != null)
1859
+ .map((entry) => {
1860
+ return de_LicenseRecommendation(entry, context);
1861
+ });
1862
+ return retVal;
1863
+ };
1701
1864
  const de_MetricValues = (output, context) => {
1702
1865
  const retVal = (output || [])
1703
1866
  .filter((e) => e != null)
@@ -6,6 +6,7 @@ import { ExportEBSVolumeRecommendationsCommandInput, ExportEBSVolumeRecommendati
6
6
  import { ExportEC2InstanceRecommendationsCommandInput, ExportEC2InstanceRecommendationsCommandOutput } from "./commands/ExportEC2InstanceRecommendationsCommand";
7
7
  import { ExportECSServiceRecommendationsCommandInput, ExportECSServiceRecommendationsCommandOutput } from "./commands/ExportECSServiceRecommendationsCommand";
8
8
  import { ExportLambdaFunctionRecommendationsCommandInput, ExportLambdaFunctionRecommendationsCommandOutput } from "./commands/ExportLambdaFunctionRecommendationsCommand";
9
+ import { ExportLicenseRecommendationsCommandInput, ExportLicenseRecommendationsCommandOutput } from "./commands/ExportLicenseRecommendationsCommand";
9
10
  import { GetAutoScalingGroupRecommendationsCommandInput, GetAutoScalingGroupRecommendationsCommandOutput } from "./commands/GetAutoScalingGroupRecommendationsCommand";
10
11
  import { GetEBSVolumeRecommendationsCommandInput, GetEBSVolumeRecommendationsCommandOutput } from "./commands/GetEBSVolumeRecommendationsCommand";
11
12
  import { GetEC2InstanceRecommendationsCommandInput, GetEC2InstanceRecommendationsCommandOutput } from "./commands/GetEC2InstanceRecommendationsCommand";
@@ -16,6 +17,7 @@ import { GetEffectiveRecommendationPreferencesCommandInput, GetEffectiveRecommen
16
17
  import { GetEnrollmentStatusCommandInput, GetEnrollmentStatusCommandOutput } from "./commands/GetEnrollmentStatusCommand";
17
18
  import { GetEnrollmentStatusesForOrganizationCommandInput, GetEnrollmentStatusesForOrganizationCommandOutput } from "./commands/GetEnrollmentStatusesForOrganizationCommand";
18
19
  import { GetLambdaFunctionRecommendationsCommandInput, GetLambdaFunctionRecommendationsCommandOutput } from "./commands/GetLambdaFunctionRecommendationsCommand";
20
+ import { GetLicenseRecommendationsCommandInput, GetLicenseRecommendationsCommandOutput } from "./commands/GetLicenseRecommendationsCommand";
19
21
  import { GetRecommendationPreferencesCommandInput, GetRecommendationPreferencesCommandOutput } from "./commands/GetRecommendationPreferencesCommand";
20
22
  import { GetRecommendationSummariesCommandInput, GetRecommendationSummariesCommandOutput } from "./commands/GetRecommendationSummariesCommand";
21
23
  import { PutRecommendationPreferencesCommandInput, PutRecommendationPreferencesCommandOutput } from "./commands/PutRecommendationPreferencesCommand";
@@ -64,6 +66,12 @@ export interface ComputeOptimizer {
64
66
  exportLambdaFunctionRecommendations(args: ExportLambdaFunctionRecommendationsCommandInput, options?: __HttpHandlerOptions): Promise<ExportLambdaFunctionRecommendationsCommandOutput>;
65
67
  exportLambdaFunctionRecommendations(args: ExportLambdaFunctionRecommendationsCommandInput, cb: (err: any, data?: ExportLambdaFunctionRecommendationsCommandOutput) => void): void;
66
68
  exportLambdaFunctionRecommendations(args: ExportLambdaFunctionRecommendationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ExportLambdaFunctionRecommendationsCommandOutput) => void): void;
69
+ /**
70
+ * @see {@link ExportLicenseRecommendationsCommand}
71
+ */
72
+ exportLicenseRecommendations(args: ExportLicenseRecommendationsCommandInput, options?: __HttpHandlerOptions): Promise<ExportLicenseRecommendationsCommandOutput>;
73
+ exportLicenseRecommendations(args: ExportLicenseRecommendationsCommandInput, cb: (err: any, data?: ExportLicenseRecommendationsCommandOutput) => void): void;
74
+ exportLicenseRecommendations(args: ExportLicenseRecommendationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ExportLicenseRecommendationsCommandOutput) => void): void;
67
75
  /**
68
76
  * @see {@link GetAutoScalingGroupRecommendationsCommand}
69
77
  */
@@ -124,6 +132,12 @@ export interface ComputeOptimizer {
124
132
  getLambdaFunctionRecommendations(args: GetLambdaFunctionRecommendationsCommandInput, options?: __HttpHandlerOptions): Promise<GetLambdaFunctionRecommendationsCommandOutput>;
125
133
  getLambdaFunctionRecommendations(args: GetLambdaFunctionRecommendationsCommandInput, cb: (err: any, data?: GetLambdaFunctionRecommendationsCommandOutput) => void): void;
126
134
  getLambdaFunctionRecommendations(args: GetLambdaFunctionRecommendationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetLambdaFunctionRecommendationsCommandOutput) => void): void;
135
+ /**
136
+ * @see {@link GetLicenseRecommendationsCommand}
137
+ */
138
+ getLicenseRecommendations(args: GetLicenseRecommendationsCommandInput, options?: __HttpHandlerOptions): Promise<GetLicenseRecommendationsCommandOutput>;
139
+ getLicenseRecommendations(args: GetLicenseRecommendationsCommandInput, cb: (err: any, data?: GetLicenseRecommendationsCommandOutput) => void): void;
140
+ getLicenseRecommendations(args: GetLicenseRecommendationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetLicenseRecommendationsCommandOutput) => void): void;
127
141
  /**
128
142
  * @see {@link GetRecommendationPreferencesCommand}
129
143
  */
@@ -15,6 +15,7 @@ import { ExportEBSVolumeRecommendationsCommandInput, ExportEBSVolumeRecommendati
15
15
  import { ExportEC2InstanceRecommendationsCommandInput, ExportEC2InstanceRecommendationsCommandOutput } from "./commands/ExportEC2InstanceRecommendationsCommand";
16
16
  import { ExportECSServiceRecommendationsCommandInput, ExportECSServiceRecommendationsCommandOutput } from "./commands/ExportECSServiceRecommendationsCommand";
17
17
  import { ExportLambdaFunctionRecommendationsCommandInput, ExportLambdaFunctionRecommendationsCommandOutput } from "./commands/ExportLambdaFunctionRecommendationsCommand";
18
+ import { ExportLicenseRecommendationsCommandInput, ExportLicenseRecommendationsCommandOutput } from "./commands/ExportLicenseRecommendationsCommand";
18
19
  import { GetAutoScalingGroupRecommendationsCommandInput, GetAutoScalingGroupRecommendationsCommandOutput } from "./commands/GetAutoScalingGroupRecommendationsCommand";
19
20
  import { GetEBSVolumeRecommendationsCommandInput, GetEBSVolumeRecommendationsCommandOutput } from "./commands/GetEBSVolumeRecommendationsCommand";
20
21
  import { GetEC2InstanceRecommendationsCommandInput, GetEC2InstanceRecommendationsCommandOutput } from "./commands/GetEC2InstanceRecommendationsCommand";
@@ -25,6 +26,7 @@ import { GetEffectiveRecommendationPreferencesCommandInput, GetEffectiveRecommen
25
26
  import { GetEnrollmentStatusCommandInput, GetEnrollmentStatusCommandOutput } from "./commands/GetEnrollmentStatusCommand";
26
27
  import { GetEnrollmentStatusesForOrganizationCommandInput, GetEnrollmentStatusesForOrganizationCommandOutput } from "./commands/GetEnrollmentStatusesForOrganizationCommand";
27
28
  import { GetLambdaFunctionRecommendationsCommandInput, GetLambdaFunctionRecommendationsCommandOutput } from "./commands/GetLambdaFunctionRecommendationsCommand";
29
+ import { GetLicenseRecommendationsCommandInput, GetLicenseRecommendationsCommandOutput } from "./commands/GetLicenseRecommendationsCommand";
28
30
  import { GetRecommendationPreferencesCommandInput, GetRecommendationPreferencesCommandOutput } from "./commands/GetRecommendationPreferencesCommand";
29
31
  import { GetRecommendationSummariesCommandInput, GetRecommendationSummariesCommandOutput } from "./commands/GetRecommendationSummariesCommand";
30
32
  import { PutRecommendationPreferencesCommandInput, PutRecommendationPreferencesCommandOutput } from "./commands/PutRecommendationPreferencesCommand";
@@ -35,11 +37,11 @@ export { __Client };
35
37
  /**
36
38
  * @public
37
39
  */
38
- export type ServiceInputTypes = DeleteRecommendationPreferencesCommandInput | DescribeRecommendationExportJobsCommandInput | ExportAutoScalingGroupRecommendationsCommandInput | ExportEBSVolumeRecommendationsCommandInput | ExportEC2InstanceRecommendationsCommandInput | ExportECSServiceRecommendationsCommandInput | ExportLambdaFunctionRecommendationsCommandInput | GetAutoScalingGroupRecommendationsCommandInput | GetEBSVolumeRecommendationsCommandInput | GetEC2InstanceRecommendationsCommandInput | GetEC2RecommendationProjectedMetricsCommandInput | GetECSServiceRecommendationProjectedMetricsCommandInput | GetECSServiceRecommendationsCommandInput | GetEffectiveRecommendationPreferencesCommandInput | GetEnrollmentStatusCommandInput | GetEnrollmentStatusesForOrganizationCommandInput | GetLambdaFunctionRecommendationsCommandInput | GetRecommendationPreferencesCommandInput | GetRecommendationSummariesCommandInput | PutRecommendationPreferencesCommandInput | UpdateEnrollmentStatusCommandInput;
40
+ export type ServiceInputTypes = DeleteRecommendationPreferencesCommandInput | DescribeRecommendationExportJobsCommandInput | ExportAutoScalingGroupRecommendationsCommandInput | ExportEBSVolumeRecommendationsCommandInput | ExportEC2InstanceRecommendationsCommandInput | ExportECSServiceRecommendationsCommandInput | ExportLambdaFunctionRecommendationsCommandInput | ExportLicenseRecommendationsCommandInput | GetAutoScalingGroupRecommendationsCommandInput | GetEBSVolumeRecommendationsCommandInput | GetEC2InstanceRecommendationsCommandInput | GetEC2RecommendationProjectedMetricsCommandInput | GetECSServiceRecommendationProjectedMetricsCommandInput | GetECSServiceRecommendationsCommandInput | GetEffectiveRecommendationPreferencesCommandInput | GetEnrollmentStatusCommandInput | GetEnrollmentStatusesForOrganizationCommandInput | GetLambdaFunctionRecommendationsCommandInput | GetLicenseRecommendationsCommandInput | GetRecommendationPreferencesCommandInput | GetRecommendationSummariesCommandInput | PutRecommendationPreferencesCommandInput | UpdateEnrollmentStatusCommandInput;
39
41
  /**
40
42
  * @public
41
43
  */
42
- export type ServiceOutputTypes = DeleteRecommendationPreferencesCommandOutput | DescribeRecommendationExportJobsCommandOutput | ExportAutoScalingGroupRecommendationsCommandOutput | ExportEBSVolumeRecommendationsCommandOutput | ExportEC2InstanceRecommendationsCommandOutput | ExportECSServiceRecommendationsCommandOutput | ExportLambdaFunctionRecommendationsCommandOutput | GetAutoScalingGroupRecommendationsCommandOutput | GetEBSVolumeRecommendationsCommandOutput | GetEC2InstanceRecommendationsCommandOutput | GetEC2RecommendationProjectedMetricsCommandOutput | GetECSServiceRecommendationProjectedMetricsCommandOutput | GetECSServiceRecommendationsCommandOutput | GetEffectiveRecommendationPreferencesCommandOutput | GetEnrollmentStatusCommandOutput | GetEnrollmentStatusesForOrganizationCommandOutput | GetLambdaFunctionRecommendationsCommandOutput | GetRecommendationPreferencesCommandOutput | GetRecommendationSummariesCommandOutput | PutRecommendationPreferencesCommandOutput | UpdateEnrollmentStatusCommandOutput;
44
+ export type ServiceOutputTypes = DeleteRecommendationPreferencesCommandOutput | DescribeRecommendationExportJobsCommandOutput | ExportAutoScalingGroupRecommendationsCommandOutput | ExportEBSVolumeRecommendationsCommandOutput | ExportEC2InstanceRecommendationsCommandOutput | ExportECSServiceRecommendationsCommandOutput | ExportLambdaFunctionRecommendationsCommandOutput | ExportLicenseRecommendationsCommandOutput | GetAutoScalingGroupRecommendationsCommandOutput | GetEBSVolumeRecommendationsCommandOutput | GetEC2InstanceRecommendationsCommandOutput | GetEC2RecommendationProjectedMetricsCommandOutput | GetECSServiceRecommendationProjectedMetricsCommandOutput | GetECSServiceRecommendationsCommandOutput | GetEffectiveRecommendationPreferencesCommandOutput | GetEnrollmentStatusCommandOutput | GetEnrollmentStatusesForOrganizationCommandOutput | GetLambdaFunctionRecommendationsCommandOutput | GetLicenseRecommendationsCommandOutput | GetRecommendationPreferencesCommandOutput | GetRecommendationSummariesCommandOutput | PutRecommendationPreferencesCommandOutput | UpdateEnrollmentStatusCommandOutput;
43
45
  /**
44
46
  * @public
45
47
  */
@@ -34,7 +34,7 @@ export interface DeleteRecommendationPreferencesCommandOutput extends DeleteReco
34
34
  * // const { ComputeOptimizerClient, DeleteRecommendationPreferencesCommand } = require("@aws-sdk/client-compute-optimizer"); // CommonJS import
35
35
  * const client = new ComputeOptimizerClient(config);
36
36
  * const input = { // DeleteRecommendationPreferencesRequest
37
- * resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService", // required
37
+ * resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService" || "License", // required
38
38
  * scope: { // Scope
39
39
  * name: "Organization" || "AccountId" || "ResourceArn",
40
40
  * value: "STRING_VALUE",
@@ -61,7 +61,7 @@ export interface DescribeRecommendationExportJobsCommandOutput extends DescribeR
61
61
  * // metadataKey: "STRING_VALUE",
62
62
  * // },
63
63
  * // },
64
- * // resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService",
64
+ * // resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService" || "License",
65
65
  * // status: "Queued" || "InProgress" || "Complete" || "Failed",
66
66
  * // creationTimestamp: new Date("TIMESTAMP"),
67
67
  * // lastUpdatedTimestamp: new Date("TIMESTAMP"),
@@ -0,0 +1,129 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
4
+ import { ComputeOptimizerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ComputeOptimizerClient";
5
+ import { ExportLicenseRecommendationsRequest, ExportLicenseRecommendationsResponse } from "../models/models_0";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ExportLicenseRecommendationsCommand}.
14
+ */
15
+ export interface ExportLicenseRecommendationsCommandInput extends ExportLicenseRecommendationsRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ExportLicenseRecommendationsCommand}.
21
+ */
22
+ export interface ExportLicenseRecommendationsCommandOutput extends ExportLicenseRecommendationsResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>
27
+ * Export optimization recommendations for your licenses.
28
+ * </p>
29
+ * <p>Recommendations are exported in a comma-separated values (CSV) file, and its metadata
30
+ * in a JavaScript Object Notation (JSON) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html">Exporting
31
+ * Recommendations</a> in the <i>Compute Optimizer User
32
+ * Guide</i>.</p>
33
+ * <p>You can have only one license export job in progress per Amazon Web Services Region.</p>
34
+ * @example
35
+ * Use a bare-bones client and the command you need to make an API call.
36
+ * ```javascript
37
+ * import { ComputeOptimizerClient, ExportLicenseRecommendationsCommand } from "@aws-sdk/client-compute-optimizer"; // ES Modules import
38
+ * // const { ComputeOptimizerClient, ExportLicenseRecommendationsCommand } = require("@aws-sdk/client-compute-optimizer"); // CommonJS import
39
+ * const client = new ComputeOptimizerClient(config);
40
+ * const input = { // ExportLicenseRecommendationsRequest
41
+ * accountIds: [ // AccountIds
42
+ * "STRING_VALUE",
43
+ * ],
44
+ * filters: [ // LicenseRecommendationFilters
45
+ * { // LicenseRecommendationFilter
46
+ * name: "Finding" || "FindingReasonCode" || "LicenseName",
47
+ * values: [ // FilterValues
48
+ * "STRING_VALUE",
49
+ * ],
50
+ * },
51
+ * ],
52
+ * fieldsToExport: [ // ExportableLicenseFields
53
+ * "AccountId" || "ResourceArn" || "LookbackPeriodInDays" || "LastRefreshTimestamp" || "Finding" || "FindingReasonCodes" || "CurrentLicenseConfigurationNumberOfCores" || "CurrentLicenseConfigurationInstanceType" || "CurrentLicenseConfigurationOperatingSystem" || "CurrentLicenseConfigurationLicenseName" || "CurrentLicenseConfigurationLicenseEdition" || "CurrentLicenseConfigurationLicenseModel" || "CurrentLicenseConfigurationLicenseVersion" || "CurrentLicenseConfigurationMetricsSource" || "RecommendationOptionsOperatingSystem" || "RecommendationOptionsLicenseEdition" || "RecommendationOptionsLicenseModel" || "RecommendationOptionsSavingsOpportunityPercentage" || "RecommendationOptionsEstimatedMonthlySavingsCurrency" || "RecommendationOptionsEstimatedMonthlySavingsValue" || "Tags",
54
+ * ],
55
+ * s3DestinationConfig: { // S3DestinationConfig
56
+ * bucket: "STRING_VALUE",
57
+ * keyPrefix: "STRING_VALUE",
58
+ * },
59
+ * fileFormat: "Csv",
60
+ * includeMemberAccounts: true || false,
61
+ * };
62
+ * const command = new ExportLicenseRecommendationsCommand(input);
63
+ * const response = await client.send(command);
64
+ * // { // ExportLicenseRecommendationsResponse
65
+ * // jobId: "STRING_VALUE",
66
+ * // s3Destination: { // S3Destination
67
+ * // bucket: "STRING_VALUE",
68
+ * // key: "STRING_VALUE",
69
+ * // metadataKey: "STRING_VALUE",
70
+ * // },
71
+ * // };
72
+ *
73
+ * ```
74
+ *
75
+ * @param ExportLicenseRecommendationsCommandInput - {@link ExportLicenseRecommendationsCommandInput}
76
+ * @returns {@link ExportLicenseRecommendationsCommandOutput}
77
+ * @see {@link ExportLicenseRecommendationsCommandInput} for command's `input` shape.
78
+ * @see {@link ExportLicenseRecommendationsCommandOutput} for command's `response` shape.
79
+ * @see {@link ComputeOptimizerClientResolvedConfig | config} for ComputeOptimizerClient's `config` shape.
80
+ *
81
+ * @throws {@link AccessDeniedException} (client fault)
82
+ * <p>You do not have sufficient access to perform this action.</p>
83
+ *
84
+ * @throws {@link InternalServerException} (server fault)
85
+ * <p>An internal error has occurred. Try your call again.</p>
86
+ *
87
+ * @throws {@link InvalidParameterValueException} (client fault)
88
+ * <p>The value supplied for the input parameter is out of range or not valid.</p>
89
+ *
90
+ * @throws {@link LimitExceededException} (client fault)
91
+ * <p>The request exceeds a limit of the service.</p>
92
+ *
93
+ * @throws {@link MissingAuthenticationToken} (client fault)
94
+ * <p>The request must contain either a valid (registered) Amazon Web Services access key ID
95
+ * or X.509 certificate.</p>
96
+ *
97
+ * @throws {@link OptInRequiredException} (client fault)
98
+ * <p>The account is not opted in to Compute Optimizer.</p>
99
+ *
100
+ * @throws {@link ServiceUnavailableException} (server fault)
101
+ * <p>The request has failed due to a temporary failure of the server.</p>
102
+ *
103
+ * @throws {@link ThrottlingException} (client fault)
104
+ * <p>The request was denied due to request throttling.</p>
105
+ *
106
+ * @throws {@link ComputeOptimizerServiceException}
107
+ * <p>Base exception class for all service exceptions from ComputeOptimizer service.</p>
108
+ *
109
+ */
110
+ export declare class ExportLicenseRecommendationsCommand extends $Command<ExportLicenseRecommendationsCommandInput, ExportLicenseRecommendationsCommandOutput, ComputeOptimizerClientResolvedConfig> {
111
+ readonly input: ExportLicenseRecommendationsCommandInput;
112
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
113
+ /**
114
+ * @public
115
+ */
116
+ constructor(input: ExportLicenseRecommendationsCommandInput);
117
+ /**
118
+ * @internal
119
+ */
120
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ComputeOptimizerClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ExportLicenseRecommendationsCommandInput, ExportLicenseRecommendationsCommandOutput>;
121
+ /**
122
+ * @internal
123
+ */
124
+ private serialize;
125
+ /**
126
+ * @internal
127
+ */
128
+ private deserialize;
129
+ }
@@ -107,7 +107,7 @@ export interface GetEC2InstanceRecommendationsCommandOutput extends GetEC2Instan
107
107
  * // recommendationSources: [ // RecommendationSources
108
108
  * // { // RecommendationSource
109
109
  * // recommendationSourceArn: "STRING_VALUE",
110
- * // recommendationSourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "EcsService",
110
+ * // recommendationSourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "EcsService" || "License",
111
111
  * // },
112
112
  * // ],
113
113
  * // lastRefreshTimestamp: new Date("TIMESTAMP"),