/*
* 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 Lambda function recommendation.
///
public partial class LambdaFunctionRecommendation
{
private string _accountId;
private int? _currentMemorySize;
private CurrentPerformanceRisk _currentPerformanceRisk;
private LambdaFunctionRecommendationFinding _finding;
private List _findingReasonCodes = new List();
private string _functionArn;
private string _functionVersion;
private DateTime? _lastRefreshTimestamp;
private double? _lookbackPeriodInDays;
private List _memorySizeRecommendationOptions = new List();
private long? _numberOfInvocations;
private List _tags = new List();
private List _utilizationMetrics = new List();
///
/// Gets and sets the property AccountId.
///
/// The Amazon Web Services account ID of the function.
///
///
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 CurrentMemorySize.
///
/// The amount of memory, in MB, that's allocated to the current function.
///
///
public int CurrentMemorySize
{
get { return this._currentMemorySize.GetValueOrDefault(); }
set { this._currentMemorySize = value; }
}
// Check to see if CurrentMemorySize property is set
internal bool IsSetCurrentMemorySize()
{
return this._currentMemorySize.HasValue;
}
///
/// Gets and sets the property CurrentPerformanceRisk.
///
/// The risk of the current Lambda function not meeting the performance needs of its workloads.
/// The higher the risk, the more likely the current Lambda function requires more memory.
///
///
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 Finding.
///
/// The finding classification of the function.
///
///
///
/// Findings for functions include:
///
/// -
///
///
Optimized
— The function is correctly provisioned to run your
/// workload based on its current configuration and its utilization history. This finding
/// classification does not include finding reason codes.
///
/// -
///
///
NotOptimized
— The function is performing at a higher level
/// (over-provisioned) or at a lower level (under-provisioned) than required for your
/// workload because its current configuration is not optimal. Over-provisioned resources
/// might lead to unnecessary infrastructure cost, and under-provisioned resources might
/// lead to poor application performance. This finding classification can include the
/// MemoryUnderprovisioned
and MemoryUnderprovisioned
finding
/// reason codes.
///
/// -
///
///
Unavailable
— Compute Optimizer was unable to generate a recommendation
/// for the function. This could be because the function has not accumulated sufficient
/// metric data, or the function does not qualify for a recommendation. This finding classification
/// can include the InsufficientData
and Inconclusive
finding
/// reason codes.
///
///
///
/// Functions with a finding of unavailable are not returned unless you specify the filter
/// parameter with a value of Unavailable
in your GetLambdaFunctionRecommendations
/// request.
///
///
///
public LambdaFunctionRecommendationFinding 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 function.
///
///
///
/// Functions that have a finding classification of Optimized
don't have
/// a finding reason code.
///
///
///
/// Finding reason codes for functions include:
///
/// -
///
///
MemoryOverprovisioned
— The function is over-provisioned when
/// its memory configuration can be sized down while still meeting the performance requirements
/// of your workload. An over-provisioned function might lead to unnecessary infrastructure
/// cost. This finding reason code is part of the NotOptimized
finding classification.
///
/// -
///
///
MemoryUnderprovisioned
— The function is under-provisioned
/// when its memory configuration doesn't meet the performance requirements of the workload.
/// An under-provisioned function might lead to poor application performance. This finding
/// reason code is part of the NotOptimized
finding classification.
///
/// -
///
///
InsufficientData
— The function does not have sufficient metric
/// data for Compute Optimizer to generate a recommendation. For more information, see
/// the Supported
/// resources and requirements in the Compute Optimizer User Guide. This finding
/// reason code is part of the Unavailable
finding classification.
///
/// -
///
///
Inconclusive
— The function does not qualify for a recommendation
/// because Compute Optimizer cannot generate a recommendation with a high degree of confidence.
/// This finding reason code is part of the Unavailable
finding classification.
///
///
///
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 FunctionArn.
///
/// The Amazon Resource Name (ARN) of the current function.
///
///
public string FunctionArn
{
get { return this._functionArn; }
set { this._functionArn = value; }
}
// Check to see if FunctionArn property is set
internal bool IsSetFunctionArn()
{
return this._functionArn != null;
}
///
/// Gets and sets the property FunctionVersion.
///
/// The version number of the current function.
///
///
public string FunctionVersion
{
get { return this._functionVersion; }
set { this._functionVersion = value; }
}
// Check to see if FunctionVersion property is set
internal bool IsSetFunctionVersion()
{
return this._functionVersion != null;
}
///
/// Gets and sets the property LastRefreshTimestamp.
///
/// The timestamp of when the function 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 function.
///
///
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 MemorySizeRecommendationOptions.
///
/// An array of objects that describe the memory configuration recommendation options
/// for the function.
///
///
public List MemorySizeRecommendationOptions
{
get { return this._memorySizeRecommendationOptions; }
set { this._memorySizeRecommendationOptions = value; }
}
// Check to see if MemorySizeRecommendationOptions property is set
internal bool IsSetMemorySizeRecommendationOptions()
{
return this._memorySizeRecommendationOptions != null && this._memorySizeRecommendationOptions.Count > 0;
}
///
/// Gets and sets the property NumberOfInvocations.
///
/// The number of times your function code was applied during the look-back period.
///
///
public long NumberOfInvocations
{
get { return this._numberOfInvocations.GetValueOrDefault(); }
set { this._numberOfInvocations = value; }
}
// Check to see if NumberOfInvocations property is set
internal bool IsSetNumberOfInvocations()
{
return this._numberOfInvocations.HasValue;
}
///
/// Gets and sets the property Tags.
///
/// A list of tags assigned to your Lambda function 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 function.
///
///
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;
}
}
}