/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ComputeOptimizer { namespace Model { /** *

Describes an Amazon EC2 instance recommendation.

See Also:

* AWS * API Reference

*/ class AWS_COMPUTEOPTIMIZER_API InstanceRecommendation { public: InstanceRecommendation(); InstanceRecommendation(Aws::Utils::Json::JsonView jsonValue); InstanceRecommendation& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

The Amazon Resource Name (ARN) of the current instance.

*/ inline const Aws::String& GetInstanceArn() const{ return m_instanceArn; } /** *

The Amazon Resource Name (ARN) of the current instance.

*/ inline bool InstanceArnHasBeenSet() const { return m_instanceArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the current instance.

*/ inline void SetInstanceArn(const Aws::String& value) { m_instanceArnHasBeenSet = true; m_instanceArn = value; } /** *

The Amazon Resource Name (ARN) of the current instance.

*/ inline void SetInstanceArn(Aws::String&& value) { m_instanceArnHasBeenSet = true; m_instanceArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the current instance.

*/ inline void SetInstanceArn(const char* value) { m_instanceArnHasBeenSet = true; m_instanceArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the current instance.

*/ inline InstanceRecommendation& WithInstanceArn(const Aws::String& value) { SetInstanceArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the current instance.

*/ inline InstanceRecommendation& WithInstanceArn(Aws::String&& value) { SetInstanceArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the current instance.

*/ inline InstanceRecommendation& WithInstanceArn(const char* value) { SetInstanceArn(value); return *this;} /** *

The AWS account ID of the instance.

*/ inline const Aws::String& GetAccountId() const{ return m_accountId; } /** *

The AWS account ID of the instance.

*/ inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; } /** *

The AWS account ID of the instance.

*/ inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; } /** *

The AWS account ID of the instance.

*/ inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); } /** *

The AWS account ID of the instance.

*/ inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); } /** *

The AWS account ID of the instance.

*/ inline InstanceRecommendation& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;} /** *

The AWS account ID of the instance.

*/ inline InstanceRecommendation& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;} /** *

The AWS account ID of the instance.

*/ inline InstanceRecommendation& WithAccountId(const char* value) { SetAccountId(value); return *this;} /** *

The name of the current instance.

*/ inline const Aws::String& GetInstanceName() const{ return m_instanceName; } /** *

The name of the current instance.

*/ inline bool InstanceNameHasBeenSet() const { return m_instanceNameHasBeenSet; } /** *

The name of the current instance.

*/ inline void SetInstanceName(const Aws::String& value) { m_instanceNameHasBeenSet = true; m_instanceName = value; } /** *

The name of the current instance.

*/ inline void SetInstanceName(Aws::String&& value) { m_instanceNameHasBeenSet = true; m_instanceName = std::move(value); } /** *

The name of the current instance.

*/ inline void SetInstanceName(const char* value) { m_instanceNameHasBeenSet = true; m_instanceName.assign(value); } /** *

The name of the current instance.

*/ inline InstanceRecommendation& WithInstanceName(const Aws::String& value) { SetInstanceName(value); return *this;} /** *

The name of the current instance.

*/ inline InstanceRecommendation& WithInstanceName(Aws::String&& value) { SetInstanceName(std::move(value)); return *this;} /** *

The name of the current instance.

*/ inline InstanceRecommendation& WithInstanceName(const char* value) { SetInstanceName(value); return *this;} /** *

The instance type of the current instance.

*/ inline const Aws::String& GetCurrentInstanceType() const{ return m_currentInstanceType; } /** *

The instance type of the current instance.

*/ inline bool CurrentInstanceTypeHasBeenSet() const { return m_currentInstanceTypeHasBeenSet; } /** *

The instance type of the current instance.

*/ inline void SetCurrentInstanceType(const Aws::String& value) { m_currentInstanceTypeHasBeenSet = true; m_currentInstanceType = value; } /** *

The instance type of the current instance.

*/ inline void SetCurrentInstanceType(Aws::String&& value) { m_currentInstanceTypeHasBeenSet = true; m_currentInstanceType = std::move(value); } /** *

The instance type of the current instance.

*/ inline void SetCurrentInstanceType(const char* value) { m_currentInstanceTypeHasBeenSet = true; m_currentInstanceType.assign(value); } /** *

The instance type of the current instance.

*/ inline InstanceRecommendation& WithCurrentInstanceType(const Aws::String& value) { SetCurrentInstanceType(value); return *this;} /** *

The instance type of the current instance.

*/ inline InstanceRecommendation& WithCurrentInstanceType(Aws::String&& value) { SetCurrentInstanceType(std::move(value)); return *this;} /** *

The instance type of the current instance.

*/ inline InstanceRecommendation& WithCurrentInstanceType(const char* value) { SetCurrentInstanceType(value); return *this;} /** *

The finding classification for the instance.

Findings for instances * include:

  • Underprovisioned —An instance is * considered under-provisioned when at least one specification of your instance, * such as CPU, memory, or network, does not meet the performance requirements of * your workload. Under-provisioned instances may lead to poor application * performance.

  • Overprovisioned —An * instance is considered over-provisioned when at least one specification of your * instance, such as CPU, memory, or network, can be sized down while still meeting * the performance requirements of your workload, and no specification is * under-provisioned. Over-provisioned instances may lead to unnecessary * infrastructure cost.

  • Optimized —An * instance is considered optimized when all specifications of your instance, such * as CPU, memory, and network, meet the performance requirements of your workload * and is not over provisioned. An optimized instance runs your workloads with * optimal performance and infrastructure cost. For optimized resources, AWS * Compute Optimizer might recommend a new generation instance type.

  • *

The values that are returned might be * UNDER_PROVISIONED, OVER_PROVISIONED, or * OPTIMIZED.

*/ inline const Finding& GetFinding() const{ return m_finding; } /** *

The finding classification for the instance.

Findings for instances * include:

  • Underprovisioned —An instance is * considered under-provisioned when at least one specification of your instance, * such as CPU, memory, or network, does not meet the performance requirements of * your workload. Under-provisioned instances may lead to poor application * performance.

  • Overprovisioned —An * instance is considered over-provisioned when at least one specification of your * instance, such as CPU, memory, or network, can be sized down while still meeting * the performance requirements of your workload, and no specification is * under-provisioned. Over-provisioned instances may lead to unnecessary * infrastructure cost.

  • Optimized —An * instance is considered optimized when all specifications of your instance, such * as CPU, memory, and network, meet the performance requirements of your workload * and is not over provisioned. An optimized instance runs your workloads with * optimal performance and infrastructure cost. For optimized resources, AWS * Compute Optimizer might recommend a new generation instance type.

  • *

The values that are returned might be * UNDER_PROVISIONED, OVER_PROVISIONED, or * OPTIMIZED.

*/ inline bool FindingHasBeenSet() const { return m_findingHasBeenSet; } /** *

The finding classification for the instance.

Findings for instances * include:

  • Underprovisioned —An instance is * considered under-provisioned when at least one specification of your instance, * such as CPU, memory, or network, does not meet the performance requirements of * your workload. Under-provisioned instances may lead to poor application * performance.

  • Overprovisioned —An * instance is considered over-provisioned when at least one specification of your * instance, such as CPU, memory, or network, can be sized down while still meeting * the performance requirements of your workload, and no specification is * under-provisioned. Over-provisioned instances may lead to unnecessary * infrastructure cost.

  • Optimized —An * instance is considered optimized when all specifications of your instance, such * as CPU, memory, and network, meet the performance requirements of your workload * and is not over provisioned. An optimized instance runs your workloads with * optimal performance and infrastructure cost. For optimized resources, AWS * Compute Optimizer might recommend a new generation instance type.

  • *

The values that are returned might be * UNDER_PROVISIONED, OVER_PROVISIONED, or * OPTIMIZED.

*/ inline void SetFinding(const Finding& value) { m_findingHasBeenSet = true; m_finding = value; } /** *

The finding classification for the instance.

Findings for instances * include:

  • Underprovisioned —An instance is * considered under-provisioned when at least one specification of your instance, * such as CPU, memory, or network, does not meet the performance requirements of * your workload. Under-provisioned instances may lead to poor application * performance.

  • Overprovisioned —An * instance is considered over-provisioned when at least one specification of your * instance, such as CPU, memory, or network, can be sized down while still meeting * the performance requirements of your workload, and no specification is * under-provisioned. Over-provisioned instances may lead to unnecessary * infrastructure cost.

  • Optimized —An * instance is considered optimized when all specifications of your instance, such * as CPU, memory, and network, meet the performance requirements of your workload * and is not over provisioned. An optimized instance runs your workloads with * optimal performance and infrastructure cost. For optimized resources, AWS * Compute Optimizer might recommend a new generation instance type.

  • *

The values that are returned might be * UNDER_PROVISIONED, OVER_PROVISIONED, or * OPTIMIZED.

*/ inline void SetFinding(Finding&& value) { m_findingHasBeenSet = true; m_finding = std::move(value); } /** *

The finding classification for the instance.

Findings for instances * include:

  • Underprovisioned —An instance is * considered under-provisioned when at least one specification of your instance, * such as CPU, memory, or network, does not meet the performance requirements of * your workload. Under-provisioned instances may lead to poor application * performance.

  • Overprovisioned —An * instance is considered over-provisioned when at least one specification of your * instance, such as CPU, memory, or network, can be sized down while still meeting * the performance requirements of your workload, and no specification is * under-provisioned. Over-provisioned instances may lead to unnecessary * infrastructure cost.

  • Optimized —An * instance is considered optimized when all specifications of your instance, such * as CPU, memory, and network, meet the performance requirements of your workload * and is not over provisioned. An optimized instance runs your workloads with * optimal performance and infrastructure cost. For optimized resources, AWS * Compute Optimizer might recommend a new generation instance type.

  • *

The values that are returned might be * UNDER_PROVISIONED, OVER_PROVISIONED, or * OPTIMIZED.

*/ inline InstanceRecommendation& WithFinding(const Finding& value) { SetFinding(value); return *this;} /** *

The finding classification for the instance.

Findings for instances * include:

  • Underprovisioned —An instance is * considered under-provisioned when at least one specification of your instance, * such as CPU, memory, or network, does not meet the performance requirements of * your workload. Under-provisioned instances may lead to poor application * performance.

  • Overprovisioned —An * instance is considered over-provisioned when at least one specification of your * instance, such as CPU, memory, or network, can be sized down while still meeting * the performance requirements of your workload, and no specification is * under-provisioned. Over-provisioned instances may lead to unnecessary * infrastructure cost.

  • Optimized —An * instance is considered optimized when all specifications of your instance, such * as CPU, memory, and network, meet the performance requirements of your workload * and is not over provisioned. An optimized instance runs your workloads with * optimal performance and infrastructure cost. For optimized resources, AWS * Compute Optimizer might recommend a new generation instance type.

  • *

The values that are returned might be * UNDER_PROVISIONED, OVER_PROVISIONED, or * OPTIMIZED.

*/ inline InstanceRecommendation& WithFinding(Finding&& value) { SetFinding(std::move(value)); return *this;} /** *

An array of objects that describe the utilization metrics of the * instance.

*/ inline const Aws::Vector& GetUtilizationMetrics() const{ return m_utilizationMetrics; } /** *

An array of objects that describe the utilization metrics of the * instance.

*/ inline bool UtilizationMetricsHasBeenSet() const { return m_utilizationMetricsHasBeenSet; } /** *

An array of objects that describe the utilization metrics of the * instance.

*/ inline void SetUtilizationMetrics(const Aws::Vector& value) { m_utilizationMetricsHasBeenSet = true; m_utilizationMetrics = value; } /** *

An array of objects that describe the utilization metrics of the * instance.

*/ inline void SetUtilizationMetrics(Aws::Vector&& value) { m_utilizationMetricsHasBeenSet = true; m_utilizationMetrics = std::move(value); } /** *

An array of objects that describe the utilization metrics of the * instance.

*/ inline InstanceRecommendation& WithUtilizationMetrics(const Aws::Vector& value) { SetUtilizationMetrics(value); return *this;} /** *

An array of objects that describe the utilization metrics of the * instance.

*/ inline InstanceRecommendation& WithUtilizationMetrics(Aws::Vector&& value) { SetUtilizationMetrics(std::move(value)); return *this;} /** *

An array of objects that describe the utilization metrics of the * instance.

*/ inline InstanceRecommendation& AddUtilizationMetrics(const UtilizationMetric& value) { m_utilizationMetricsHasBeenSet = true; m_utilizationMetrics.push_back(value); return *this; } /** *

An array of objects that describe the utilization metrics of the * instance.

*/ inline InstanceRecommendation& AddUtilizationMetrics(UtilizationMetric&& value) { m_utilizationMetricsHasBeenSet = true; m_utilizationMetrics.push_back(std::move(value)); return *this; } /** *

The number of days for which utilization metrics were analyzed for the * instance.

*/ inline double GetLookBackPeriodInDays() const{ return m_lookBackPeriodInDays; } /** *

The number of days for which utilization metrics were analyzed for the * instance.

*/ inline bool LookBackPeriodInDaysHasBeenSet() const { return m_lookBackPeriodInDaysHasBeenSet; } /** *

The number of days for which utilization metrics were analyzed for the * instance.

*/ inline void SetLookBackPeriodInDays(double value) { m_lookBackPeriodInDaysHasBeenSet = true; m_lookBackPeriodInDays = value; } /** *

The number of days for which utilization metrics were analyzed for the * instance.

*/ inline InstanceRecommendation& WithLookBackPeriodInDays(double value) { SetLookBackPeriodInDays(value); return *this;} /** *

An array of objects that describe the recommendation options for the * instance.

*/ inline const Aws::Vector& GetRecommendationOptions() const{ return m_recommendationOptions; } /** *

An array of objects that describe the recommendation options for the * instance.

*/ inline bool RecommendationOptionsHasBeenSet() const { return m_recommendationOptionsHasBeenSet; } /** *

An array of objects that describe the recommendation options for the * instance.

*/ inline void SetRecommendationOptions(const Aws::Vector& value) { m_recommendationOptionsHasBeenSet = true; m_recommendationOptions = value; } /** *

An array of objects that describe the recommendation options for the * instance.

*/ inline void SetRecommendationOptions(Aws::Vector&& value) { m_recommendationOptionsHasBeenSet = true; m_recommendationOptions = std::move(value); } /** *

An array of objects that describe the recommendation options for the * instance.

*/ inline InstanceRecommendation& WithRecommendationOptions(const Aws::Vector& value) { SetRecommendationOptions(value); return *this;} /** *

An array of objects that describe the recommendation options for the * instance.

*/ inline InstanceRecommendation& WithRecommendationOptions(Aws::Vector&& value) { SetRecommendationOptions(std::move(value)); return *this;} /** *

An array of objects that describe the recommendation options for the * instance.

*/ inline InstanceRecommendation& AddRecommendationOptions(const InstanceRecommendationOption& value) { m_recommendationOptionsHasBeenSet = true; m_recommendationOptions.push_back(value); return *this; } /** *

An array of objects that describe the recommendation options for the * instance.

*/ inline InstanceRecommendation& AddRecommendationOptions(InstanceRecommendationOption&& value) { m_recommendationOptionsHasBeenSet = true; m_recommendationOptions.push_back(std::move(value)); return *this; } /** *

An array of objects that describe the source resource of the * recommendation.

*/ inline const Aws::Vector& GetRecommendationSources() const{ return m_recommendationSources; } /** *

An array of objects that describe the source resource of the * recommendation.

*/ inline bool RecommendationSourcesHasBeenSet() const { return m_recommendationSourcesHasBeenSet; } /** *

An array of objects that describe the source resource of the * recommendation.

*/ inline void SetRecommendationSources(const Aws::Vector& value) { m_recommendationSourcesHasBeenSet = true; m_recommendationSources = value; } /** *

An array of objects that describe the source resource of the * recommendation.

*/ inline void SetRecommendationSources(Aws::Vector&& value) { m_recommendationSourcesHasBeenSet = true; m_recommendationSources = std::move(value); } /** *

An array of objects that describe the source resource of the * recommendation.

*/ inline InstanceRecommendation& WithRecommendationSources(const Aws::Vector& value) { SetRecommendationSources(value); return *this;} /** *

An array of objects that describe the source resource of the * recommendation.

*/ inline InstanceRecommendation& WithRecommendationSources(Aws::Vector&& value) { SetRecommendationSources(std::move(value)); return *this;} /** *

An array of objects that describe the source resource of the * recommendation.

*/ inline InstanceRecommendation& AddRecommendationSources(const RecommendationSource& value) { m_recommendationSourcesHasBeenSet = true; m_recommendationSources.push_back(value); return *this; } /** *

An array of objects that describe the source resource of the * recommendation.

*/ inline InstanceRecommendation& AddRecommendationSources(RecommendationSource&& value) { m_recommendationSourcesHasBeenSet = true; m_recommendationSources.push_back(std::move(value)); return *this; } /** *

The time stamp of when the instance recommendation was last refreshed.

*/ inline const Aws::Utils::DateTime& GetLastRefreshTimestamp() const{ return m_lastRefreshTimestamp; } /** *

The time stamp of when the instance recommendation was last refreshed.

*/ inline bool LastRefreshTimestampHasBeenSet() const { return m_lastRefreshTimestampHasBeenSet; } /** *

The time stamp of when the instance recommendation was last refreshed.

*/ inline void SetLastRefreshTimestamp(const Aws::Utils::DateTime& value) { m_lastRefreshTimestampHasBeenSet = true; m_lastRefreshTimestamp = value; } /** *

The time stamp of when the instance recommendation was last refreshed.

*/ inline void SetLastRefreshTimestamp(Aws::Utils::DateTime&& value) { m_lastRefreshTimestampHasBeenSet = true; m_lastRefreshTimestamp = std::move(value); } /** *

The time stamp of when the instance recommendation was last refreshed.

*/ inline InstanceRecommendation& WithLastRefreshTimestamp(const Aws::Utils::DateTime& value) { SetLastRefreshTimestamp(value); return *this;} /** *

The time stamp of when the instance recommendation was last refreshed.

*/ inline InstanceRecommendation& WithLastRefreshTimestamp(Aws::Utils::DateTime&& value) { SetLastRefreshTimestamp(std::move(value)); return *this;} private: Aws::String m_instanceArn; bool m_instanceArnHasBeenSet; Aws::String m_accountId; bool m_accountIdHasBeenSet; Aws::String m_instanceName; bool m_instanceNameHasBeenSet; Aws::String m_currentInstanceType; bool m_currentInstanceTypeHasBeenSet; Finding m_finding; bool m_findingHasBeenSet; Aws::Vector m_utilizationMetrics; bool m_utilizationMetricsHasBeenSet; double m_lookBackPeriodInDays; bool m_lookBackPeriodInDaysHasBeenSet; Aws::Vector m_recommendationOptions; bool m_recommendationOptionsHasBeenSet; Aws::Vector m_recommendationSources; bool m_recommendationSourcesHasBeenSet; Aws::Utils::DateTime m_lastRefreshTimestamp; bool m_lastRefreshTimestampHasBeenSet; }; } // namespace Model } // namespace ComputeOptimizer } // namespace Aws