/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the compute-optimizer-2019-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.ComputeOptimizer.Model
{
///
/// Describes an Amazon EC2 instance recommendation.
///
public partial class InstanceRecommendation
{
private string _accountId;
private string _currentInstanceType;
private CurrentPerformanceRisk _currentPerformanceRisk;
private EffectiveRecommendationPreferences _effectiveRecommendationPreferences;
private ExternalMetricStatus _externalMetricStatus;
private Finding _finding;
private List _findingReasonCodes = new List();
private List _inferredWorkloadTypes = new List();
private string _instanceArn;
private string _instanceName;
private InstanceState _instanceState;
private DateTime? _lastRefreshTimestamp;
private double? _lookBackPeriodInDays;
private List _recommendationOptions = new List();
private List _recommendationSources = new List();
private List _tags = new List();
private List _utilizationMetrics = new List();
///
/// Gets and sets the property AccountId.
///
/// The Amazon Web Services account ID of the instance.
///
///
public string AccountId
{
get { return this._accountId; }
set { this._accountId = value; }
}
// Check to see if AccountId property is set
internal bool IsSetAccountId()
{
return this._accountId != null;
}
///
/// Gets and sets the property CurrentInstanceType.
///
/// The instance type of the current instance.
///
///
public string CurrentInstanceType
{
get { return this._currentInstanceType; }
set { this._currentInstanceType = value; }
}
// Check to see if CurrentInstanceType property is set
internal bool IsSetCurrentInstanceType()
{
return this._currentInstanceType != null;
}
///
/// Gets and sets the property CurrentPerformanceRisk.
///
/// The risk of the current instance not meeting the performance needs of its workloads.
/// The higher the risk, the more likely the current instance cannot meet the performance
/// requirements of its workload.
///
///
public CurrentPerformanceRisk CurrentPerformanceRisk
{
get { return this._currentPerformanceRisk; }
set { this._currentPerformanceRisk = value; }
}
// Check to see if CurrentPerformanceRisk property is set
internal bool IsSetCurrentPerformanceRisk()
{
return this._currentPerformanceRisk != null;
}
///
/// Gets and sets the property EffectiveRecommendationPreferences.
///
/// An object that describes the effective recommendation preferences for the instance.
///
///
public EffectiveRecommendationPreferences EffectiveRecommendationPreferences
{
get { return this._effectiveRecommendationPreferences; }
set { this._effectiveRecommendationPreferences = value; }
}
// Check to see if EffectiveRecommendationPreferences property is set
internal bool IsSetEffectiveRecommendationPreferences()
{
return this._effectiveRecommendationPreferences != null;
}
///
/// Gets and sets the property ExternalMetricStatus.
///
/// An object that describes Compute Optimizer's integration status with your external
/// metrics provider.
///
///
public ExternalMetricStatus ExternalMetricStatus
{
get { return this._externalMetricStatus; }
set { this._externalMetricStatus = value; }
}
// Check to see if ExternalMetricStatus property is set
internal bool IsSetExternalMetricStatus()
{
return this._externalMetricStatus != null;
}
///
/// Gets and sets the property Finding.
///
/// The finding classification of 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. For optimized resources, Compute Optimizer
/// might recommend a new generation instance type.
///
///
///
public Finding Finding
{
get { return this._finding; }
set { this._finding = value; }
}
// Check to see if Finding property is set
internal bool IsSetFinding()
{
return this._finding != null;
}
///
/// Gets and sets the property FindingReasonCodes.
///
/// The reason for the finding classification of the instance.
///
///
///
/// Finding reason codes for instances include:
///
/// -
///
///
CPUOverprovisioned
— The instance’s CPU configuration can be
/// sized down while still meeting the performance requirements of your workload. This
/// is identified by analyzing the CPUUtilization
metric of the current instance
/// during the look-back period.
///
/// -
///
///
CPUUnderprovisioned
— The instance’s CPU configuration doesn't
/// meet the performance requirements of your workload and there is an alternative instance
/// type that provides better CPU performance. This is identified by analyzing the CPUUtilization
/// metric of the current instance during the look-back period.
///
/// -
///
///
MemoryOverprovisioned
— The instance’s memory configuration
/// can be sized down while still meeting the performance requirements of your workload.
/// This is identified by analyzing the memory utilization metric of the current instance
/// during the look-back period.
///
/// -
///
///
MemoryUnderprovisioned
— The instance’s memory configuration
/// doesn't meet the performance requirements of your workload and there is an alternative
/// instance type that provides better memory performance. This is identified by analyzing
/// the memory utilization metric of the current instance during the look-back period.
///
///
///
/// Memory utilization is analyzed only for resources that have the unified CloudWatch
/// agent installed on them. For more information, see Enabling
/// memory utilization with the Amazon CloudWatch Agent in the Compute Optimizer
/// User Guide. On Linux instances, Compute Optimizer analyses the mem_used_percent
/// metric in the CWAgent
namespace, or the legacy MemoryUtilization
/// metric in the System/Linux
namespace. On Windows instances, Compute Optimizer
/// analyses the Memory % Committed Bytes In Use
metric in the CWAgent
/// namespace.
///
/// -
///
///
EBSThroughputOverprovisioned
— The instance’s EBS throughput
/// configuration can be sized down while still meeting the performance requirements of
/// your workload. This is identified by analyzing the VolumeReadBytes
and
/// VolumeWriteBytes
metrics of EBS volumes attached to the current instance
/// during the look-back period.
///
/// -
///
///
EBSThroughputUnderprovisioned
— The instance’s EBS throughput
/// configuration doesn't meet the performance requirements of your workload and there
/// is an alternative instance type that provides better EBS throughput performance. This
/// is identified by analyzing the VolumeReadBytes
and VolumeWriteBytes
/// metrics of EBS volumes attached to the current instance during the look-back period.
///
/// -
///
///
EBSIOPSOverprovisioned
— The instance’s EBS IOPS configuration
/// can be sized down while still meeting the performance requirements of your workload.
/// This is identified by analyzing the VolumeReadOps
and VolumeWriteOps
/// metric of EBS volumes attached to the current instance during the look-back period.
///
/// -
///
///
EBSIOPSUnderprovisioned
— The instance’s EBS IOPS configuration
/// doesn't meet the performance requirements of your workload and there is an alternative
/// instance type that provides better EBS IOPS performance. This is identified by analyzing
/// the VolumeReadOps
and VolumeWriteOps
metric of EBS volumes
/// attached to the current instance during the look-back period.
///
/// -
///
///
NetworkBandwidthOverprovisioned
— The instance’s network bandwidth
/// configuration can be sized down while still meeting the performance requirements of
/// your workload. This is identified by analyzing the NetworkIn
and NetworkOut
/// metrics of the current instance during the look-back period.
///
/// -
///
///
NetworkBandwidthUnderprovisioned
— The instance’s network bandwidth
/// configuration doesn't meet the performance requirements of your workload and there
/// is an alternative instance type that provides better network bandwidth performance.
/// This is identified by analyzing the NetworkIn
and NetworkOut
/// metrics of the current instance during the look-back period. This finding reason happens
/// when the NetworkIn
or NetworkOut
performance of an instance
/// is impacted.
///
/// -
///
///
NetworkPPSOverprovisioned
— The instance’s network PPS (packets
/// per second) configuration can be sized down while still meeting the performance requirements
/// of your workload. This is identified by analyzing the NetworkPacketsIn
/// and NetworkPacketsIn
metrics of the current instance during the look-back
/// period.
///
/// -
///
///
NetworkPPSUnderprovisioned
— The instance’s network PPS (packets
/// per second) configuration doesn't meet the performance requirements of your workload
/// and there is an alternative instance type that provides better network PPS performance.
/// This is identified by analyzing the NetworkPacketsIn
and NetworkPacketsIn
/// metrics of the current instance during the look-back period.
///
/// -
///
///
DiskIOPSOverprovisioned
— The instance’s disk IOPS configuration
/// can be sized down while still meeting the performance requirements of your workload.
/// This is identified by analyzing the DiskReadOps
and DiskWriteOps
/// metrics of the current instance during the look-back period.
///
/// -
///
///
DiskIOPSUnderprovisioned
— The instance’s disk IOPS configuration
/// doesn't meet the performance requirements of your workload and there is an alternative
/// instance type that provides better disk IOPS performance. This is identified by analyzing
/// the DiskReadOps
and DiskWriteOps
metrics of the current
/// instance during the look-back period.
///
/// -
///
///
DiskThroughputOverprovisioned
— The instance’s disk throughput
/// configuration can be sized down while still meeting the performance requirements of
/// your workload. This is identified by analyzing the DiskReadBytes
and
/// DiskWriteBytes
metrics of the current instance during the look-back period.
///
/// -
///
///
DiskThroughputUnderprovisioned
— The instance’s disk throughput
/// configuration doesn't meet the performance requirements of your workload and there
/// is an alternative instance type that provides better disk throughput performance.
/// This is identified by analyzing the DiskReadBytes
and DiskWriteBytes
/// metrics of the current instance during the look-back period.
///
///
///
/// For more information about instance metrics, see List
/// the available CloudWatch metrics for your instances in the Amazon Elastic Compute
/// Cloud User Guide. For more information about EBS volume metrics, see Amazon
/// CloudWatch metrics for Amazon EBS in the Amazon Elastic Compute Cloud User
/// Guide.
///
///
///
public List FindingReasonCodes
{
get { return this._findingReasonCodes; }
set { this._findingReasonCodes = value; }
}
// Check to see if FindingReasonCodes property is set
internal bool IsSetFindingReasonCodes()
{
return this._findingReasonCodes != null && this._findingReasonCodes.Count > 0;
}
///
/// Gets and sets the property InferredWorkloadTypes.
///
/// The applications that might be running on the instance as inferred by Compute Optimizer.
///
///
///
/// Compute Optimizer can infer if one of the following applications might be running
/// on the instance:
///
/// -
///
///
AmazonEmr
- Infers that Amazon EMR might be running on the instance.
///
/// -
///
///
ApacheCassandra
- Infers that Apache Cassandra might be running on the
/// instance.
///
/// -
///
///
ApacheHadoop
- Infers that Apache Hadoop might be running on the instance.
///
/// -
///
///
Memcached
- Infers that Memcached might be running on the instance.
///
/// -
///
///
NGINX
- Infers that NGINX might be running on the instance.
///
/// -
///
///
PostgreSql
- Infers that PostgreSQL might be running on the instance.
///
/// -
///
///
Redis
- Infers that Redis might be running on the instance.
///
/// -
///
///
Kafka
- Infers that Kafka might be running on the instance.
///
/// -
///
///
SQLServer
- Infers that SQLServer might be running on the instance.
///
///
///
public List InferredWorkloadTypes
{
get { return this._inferredWorkloadTypes; }
set { this._inferredWorkloadTypes = value; }
}
// Check to see if InferredWorkloadTypes property is set
internal bool IsSetInferredWorkloadTypes()
{
return this._inferredWorkloadTypes != null && this._inferredWorkloadTypes.Count > 0;
}
///
/// Gets and sets the property InstanceArn.
///
/// The Amazon Resource Name (ARN) of the current instance.
///
///
public string InstanceArn
{
get { return this._instanceArn; }
set { this._instanceArn = value; }
}
// Check to see if InstanceArn property is set
internal bool IsSetInstanceArn()
{
return this._instanceArn != null;
}
///
/// Gets and sets the property InstanceName.
///
/// The name of the current instance.
///
///
public string InstanceName
{
get { return this._instanceName; }
set { this._instanceName = value; }
}
// Check to see if InstanceName property is set
internal bool IsSetInstanceName()
{
return this._instanceName != null;
}
///
/// Gets and sets the property InstanceState.
///
/// The state of the instance when the recommendation was generated.
///
///
public InstanceState InstanceState
{
get { return this._instanceState; }
set { this._instanceState = value; }
}
// Check to see if InstanceState property is set
internal bool IsSetInstanceState()
{
return this._instanceState != null;
}
///
/// Gets and sets the property LastRefreshTimestamp.
///
/// The timestamp of when the instance recommendation was last generated.
///
///
public DateTime LastRefreshTimestamp
{
get { return this._lastRefreshTimestamp.GetValueOrDefault(); }
set { this._lastRefreshTimestamp = value; }
}
// Check to see if LastRefreshTimestamp property is set
internal bool IsSetLastRefreshTimestamp()
{
return this._lastRefreshTimestamp.HasValue;
}
///
/// Gets and sets the property LookBackPeriodInDays.
///
/// The number of days for which utilization metrics were analyzed for the instance.
///
///
public double LookBackPeriodInDays
{
get { return this._lookBackPeriodInDays.GetValueOrDefault(); }
set { this._lookBackPeriodInDays = value; }
}
// Check to see if LookBackPeriodInDays property is set
internal bool IsSetLookBackPeriodInDays()
{
return this._lookBackPeriodInDays.HasValue;
}
///
/// Gets and sets the property RecommendationOptions.
///
/// An array of objects that describe the recommendation options for the instance.
///
///
public List RecommendationOptions
{
get { return this._recommendationOptions; }
set { this._recommendationOptions = value; }
}
// Check to see if RecommendationOptions property is set
internal bool IsSetRecommendationOptions()
{
return this._recommendationOptions != null && this._recommendationOptions.Count > 0;
}
///
/// Gets and sets the property RecommendationSources.
///
/// An array of objects that describe the source resource of the recommendation.
///
///
public List RecommendationSources
{
get { return this._recommendationSources; }
set { this._recommendationSources = value; }
}
// Check to see if RecommendationSources property is set
internal bool IsSetRecommendationSources()
{
return this._recommendationSources != null && this._recommendationSources.Count > 0;
}
///
/// Gets and sets the property Tags.
///
/// A list of tags assigned to your Amazon EC2 instance recommendations.
///
///
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property UtilizationMetrics.
///
/// An array of objects that describe the utilization metrics of the instance.
///
///
public List UtilizationMetrics
{
get { return this._utilizationMetrics; }
set { this._utilizationMetrics = value; }
}
// Check to see if UtilizationMetrics property is set
internal bool IsSetUtilizationMetrics()
{
return this._utilizationMetrics != null && this._utilizationMetrics.Count > 0;
}
}
}