Analysis: AWS Recommendations

Analysis: AWS Recommendations

#340470

Description

The /analysis/cloud/aws/<analysisId>/results resource is used to return a collection of AWS system (i.e. EC2 instance, Auto Scaling group, etc.) recommendations for an AWS account defined by a Densify Analysis entity (see Analysis: Entity).

For each system recommendation, you can also download a PDF version of the Impact Analysis and Recommendation Report, which details system impact based on the recommendations. This report is useful to application owners and other system stakeholders who need to review recommended changes to their application resources. See the rptHref resource element for details.

To return a collection of all systems included in an AWS optimization analysis, see Analysis: AWS Systems.

To see the catalog map for a selected instance, see Systems: Analysis Details

Resource

/analysis/cloud/aws/<analysisId>/results

Supported Operations

Returned recommendation details can be in either JSON or Terraform-map format. Specify your preference using application/json in the request header.

Table: AWS Recommendations Supported Operations

HTTP Method

Input

Output

Description

GET /analysis/cloud/aws/ <analysisId>/results

Path Parameter:

Query String Parameter Options:

Accept:

  • application/json

Collection of details in JSON:

Returns a collection of recommendations for the specified analysis.

Specify application/json in the request header for recommendations to be returned in JSON format.

Example: Returning EC2 Instances with Upsize Recommendations

GET /analysis/cloud/aws/ <analysisId>/results

Path Parameter:

Query String Parameter Options:

Accept:

  • application/terraform-map

Collection of details in Terraform-map format:

Returns a collection of recommendations for an AWS analysis.

Specify application/terraform-map in the request header for recommendations to be returned in Terraform-map format.

Example: Returning AWS Recommendations with Low Effort in Terraform-map Form

Example: Returning an ASG Recommendation in Terraform-map Form

Parameters

Path Parameters

Table: AWS Recommendations Path Parameters

Parameter Name

Type

Description

analysisId

string

The unique reference ID of the AWS analysis.

When the account grouping feature is enabled and you are working through the Densify API, with the cloud accounts that are part of a group, the workspace ID is replaced by the grouped account's primary key or a unique value that is used as the analysisId or as the ID in the href, that is used to obtain the Impact Analysis and Recommendation Report.

Query String Parameters

Table: AWS Recommendation Query String Parameters

Parameter Name

Type

Description

Element Filters

string

You can use element filters to return a specific subset of the recommendations. See the "F" (filter) designation in the Response schema table for a list of elements that support filtering. Refer to Filters for a complete description of this common operation feature.

Usage example:

../results?recommendationType=Upsize

includeAttributes

  • true
  • false

Indicate whether or not to return system attributes:

  • true—returns all of the system attributes;
  • false—(default) suppress system attributes from the response output.

Usage example:

../results?includeAttributes=true

dataQuality

string

Allows you to indicate which workload type data collection detail to return for the system. See dataQuality for the returned details.

Specify a quoted list of workload type names for which data to be returned, separated by commas. The supported workload type names can be found in the Data Center Explorer (DCE) from the Analysis Console. See DCE Virtual Environment Workload Viewer to find a list of the supported workload types from the Analysis Console.

Usage example:

../results?dataQuality="CPU Utilization (CINT2006 Rate),Memory Utilization in Percent"

Note: A "400-Bad Request" error message is returned if a non-supported workload type is specified.

Response

Table: AWS Recommendation Response Schema

Element

Type

Filter/Sort

Description

entityId

string

F

The Densify assigned entity ID of the cloud system.

resourceId

string

F

The AWS identifier assigned to the system.

accountIdRef

string

F

The AWS account identifier.

region

string

F

The region containing the AWS instance.

currentType

string

 

The current instance type.

recommendationType

string

F

The recommended action for the system.

This is also known as the Optimization Type in the Densify Console (see Optimization Type Color-Coding Summary).

The following types of recommended actions are supported for this cloud platform:

  • "Just Right"—this instance is optimally sized for the workload;
  • "Upsize - Optimal Family"—this instance should be upsized to a more optimal instance family;
  • "Upsize"—this instance should be upsized to an instance within the same instance family;
  • "Terminate"—this instance should be terminated;
  • "Downsize - Optimal Family"—this instance should be downsized to an instance belonging to a more suited instance family;
  • "Downsize"—this instance should be downsized to an instance within the same instance family;
  • "Modernize - Optimal Family"—this instance should be modernized to an instance belonging to a more optimal instance family;
  • "Modernize"—this instance should be modernized to an instance within the same instance family.
  • "Not Analyzed"—this instance has no recommendation due to insufficient workload information.

For ASGs, additional recommendation actions are supported:

  • Upscale—increase compute capacity by adjusting the maximum group size;
  • Downscale—decrease compute capacity by adjusting the minimum group size.

Use recommendationType as a filter to retrieve only system actions of interest. See Example: Returning AWS Systems with No Recommendations.

Systems with insufficient information for analysis do not have a recommendation and may be returned with limited elements.

recommendedType

string

F

The recommended instance type after Densify optimization analysis.

implementationMethod

string

F

[Self Optimization|Manual|N/A]

Specifies whether this system is configured for Self-Optimization or Manual actioning based on the recommended action (recommendationType) and on the Self-Optimizing Automation policies.

Note: Self-Optimization is not supported for ASGs with more than one EC2 instance, retuned for these ASGs.

predictedUptime

percentage

 

The predicted uptime (%) for the system is based on the percentage of hours CPU utilization data is present in the workload range specified in the policy settings.

Predicted uptime % for new systems started mid-way within the workload range is calculated from the time/date that the system was started, as opposed to the beginning of the interval resulting, in more accurate prediction for the future.

Note: This element is not returned for ASGs with maximum group size greater than one. For ASGs with the maximum group size=1, the EC2's predicted uptime is returned.

totalHoursRunning

string

 

The total hours that the system has been running, in the workload range.

Total hours for a scale group is the total time the scale group has been running and does not include cumulative hours for all of the in-service instances.

totalHours

string

 

The total hours since the instance was created, that are within the workload range.

Total hours for a scale group is the total time since the scale group was created and does not include cumulative hours for all of the in-service instances.

If the system is created in the middle of the workload range, then Densify uses the creation date to calculate total hours.

name

string

F

The name of the AWS system.

Typically, this is the "Provisioning Id" AWS user tag value. If the "Provisioning Id" value is not set, then the AWS name assigned to the system is used instead.

rptHref

string

 

The reference resource to the Impact Analysis and Recommendation Report (also known as the Impact Analysis and Recommendation Report report). Use this reference to downoad the report.

This report for the specified instance is available for download after the reporting database tables have been updated (i.e. after RDB populate has been executed). By default, the reporting database tables are updated once every night.

You need to use the following in the request header to download the PDF file:
Accept : application/octet-stream
.

Note: HTTPS must be enabled to download the Impact Analysis and Recommendation Report PDF.

See Viewing the Impact Analysis and Recommendation ReportViewing the Impact Analysis and Recommendation Report for details on the content of the report.

Example: Downloading an Impact Analysis and Recommendation Report

approvalType

string

F

The approval setting for the system recommendation.

The value in this string is derived from the Self-Optimizing Automation policies in implementationMethod and the approval attribute attr_ApprovalSetting.

Possible approval settings include:

  • "na"— not approved;
  • "all"—approve any change;
  • "<recommended-instance-type>"—approve changing the instance to the specified <recommended-instance-type>.

This field is not applicable to Auto Scaling groups with maximum group size greater than one. For these systems, the approvalType will always be "na" (not approved).

densifyPolicy

string

F

The Densify policy used for optimization analysis.

savingsEstimate

string

 

The value of savingestimate output parameter is the difference between the current and recommended instance type cost (this is the catalog cost). When using the API, the predicted uptime is NOT taken into consideration (i.e. [currentCostrecommendedCost]). The Impact Analysis and Recommendation Report report uses the predicted uptime % when calculating estimated savings regardless of whether the report is obtained through the UI or via API.

See FAQs-Cloud for examples.

This calculation also applies to ASGs with maximum group size = 1. In this case, the ASG is considered an EC2, with no ASG elements exposed.

For ASGs with maximum group size greater than 1, the savings estimate is the difference between the current and recommended instance type cost (i.e. catalog cost), with the average group in-service instances taken into consideration (i.e. [Analysis: AWS Recommendations * currentCost] - [Analysis: AWS RecommendationsrecommendedCost] ).

effortEstimate

string

F

[Moderate|Low|Very Low|None|Impossible]

This element describes the effort required to investigate and implement the Densify recommendations. Effort for each system is calculated by rule-driven analytics based on factors (such as instance family change, storage change, data quality checks, feature changes, etc.) that can be configured in the policy settings and rule sets which capture best practices.

"Impossible" effort is a result of a manual override for the instance.

If a system is not ‘Not Analyzed’, Densify does not return an effortEstimate.

Note: When using the Subscription API, Densify returns an effortEstimate of "impossible" for systems that are ‘Not Analyzed’.

powerState

string

F

The power state of the system.

The powerState details are displayed for EC2, RDS and ASG instances via the API.

Power state is not shown in the UI.

recommendedHostEntityId

string

F

The Densify entity ID of the catalog instance for the recommended instance type.

currentCost

string

 

The cost of the existing instance type (i.e. the instance catalog cost).

recommendedCost

string

 

The cost of the recommended instance type (i.e. the instance catalog cost) after Densify optimization analysis.

serviceType

string

F

The AWS service type:

  • EC2
  • RDS
  • ASG
  • SPOT

Scale groups with maximum group size of 1 (i.e. maxGroupCurrent=1) have serviceType=ASG. All other returned elements are similar to those for an EC2 service (i.e. min/max group size values are not returned).

currentHourlyRate

string

 

The hourly rate for the current instance type (i.e. instance catalog cost / monthly hours). This value is rounded to the nearest penny.

recommendedHourlyRate

string

 

The hourly rate for the recommended instance type (i.e. instance catalog cost / monthly hours). This value is rounded to the nearest penny.

currentRiCoverage

integer

 

This is the percentage of reserved instance (RI) coverage available for the current instance (or scale group). Flexible RIs are taken into consideration when calculating the percentage of RI coverage. However, convertible RIs are included in the calculation depending on the AWS Defer Recommendation settings.

For individual compute or database instances, the coverage percentage is either 100% or 0%. Coverage between 0 and 100% occurs when Flexible RIs are converted into partial coverage.

For scale groups, the percentage of coverage is based on the RIs available for in-service instances.

Note: This element is returned for serviceType = EC2, RDS, and ASG.

deferRecommendation

string

 

[yes|no]

Defer recommending an instance type change until reserved instance coverage for this instance expires. Values include:

  • yes—defer instance type recommendation due to RI coverage;
  • no—do not defer instance type recommendation.

If "AWS - Defer Recommendation - Exclude Upsize Recommendation" setting is TRUE (from Densify configuration settings), then deferRecommendation = no, for Upsize recommendations, even if currentRiCoverage is 100%.

Note: This element is returned for serviceType = EC2, RDS, and ASG. This element is not returned when recommendationType is "Just Right" or "Terminate" .

deferUntil

string

 

If deferRecommendation = "yes", then the expiry date of the RI providing coverage for the current instance is returned. The expiry date and time is in milliseconds.

Note: This element is only returned when deferRecommendation = "yes".

minGroupCurrent

integer

 

Specifies the current minimum group size of the ASG.

Note: This element is only returned for ASGs with maximum group size greater than one.

Example: Returning an ASG Recommendation in Terraform-map Form

minGroupRecommended

integer

 

Specifies the recommended minimum group size for the Auto Scaling group.

Note: This element is only returned for ASGs with maximum group size greater than one.

Example: Returning an ASG Recommendation in Terraform-map Form

maxGroupCurrent

integer

 

Specifies the current maximum group size of the Auto Scaling group.

Note: This element is only returned for ASGs with maximum group size greater than one.

Example: Returning an ASG Recommendation in Terraform-map Form

maxGroupRecommended

integer

 

Specifies the recommended maximum group size for the Auto Scaling group.

Note: This element is only returned for ASGs with maximum group size greater than one.

currentDesiredCapacity

integer

 

Specifies the desired capacity currently configured for the Auto Scaling group.

Note: This element is only returned for ASGs with maximum group size greater than one.

provisioningId

string

 

This element is used to identify the terraform-map recommendations for a unique system and corresponds to the "Provisioning Id" AWS user tag value. The "Provisioning Id" user tag is used to uniquely identify a system, since its resourceId or system name could possibly change after an instance type update.

See Example: Returning AWS Recommendations with Low Effort in Terraform-map Form.

If the "Provisioning Id" user tag value is not set, then the system name is used to identify the recommendations.

Note: This element is only returned for terraform-map responses.

attributes

array of

  • id
  • name
  • value

 

System attributes are properties set during the data collection process by a vendor platform (i.e. AWS) or by Densify for analytics.

Note: The attribute array is only returned when includeAttributes=true is in the query string.

recommFirstSeen

Unix time

(in milliseconds)

 

The first date and time the recommended instance type (i.e. the recommendedType element) was provided by Densify (Unix Epoch time, in milliseconds).

recommLastSeen

Unix time

(in milliseconds)

 

The latest date and time the recommended instance type (i.e. the recommendedType element) was provided by Densify (Unix Epoch time, in milliseconds).

recommSeenCount

integer

 

The number of times Densify suggested the recommended instance type (i.e. the recommendedType element). This is the count of Densify analysis processes which produced the same recommended instance type from recommFirstSeen to recommLastSeen. This value is updated when the RDB populate task (i.e. the reporting database update process) is executed. The RDB populate task compares the current recommendedType with the new recommendedType to update the recommSeenCount counter.

Note: In typical production environments, where the RDB populate task is scheduled to run once daily post data collection and analysis, the recommSeenCount value will reflect exactly the number of times the recommended instance type was provided. If your environment executes the RDB populate task more than once daily, the recommSeenCount value will be inflated beyond the actual number of times the instance type was recommended. Contact [email protected] if you have concerns about the recommSeenCount value.

auditInfo

  • dataCollection:
    • dateFirstAudited
    • dateLastAudited
    • auditCount
  • workloadDataLast30:
    • firstDate
    • lastDate
    • totalDays
    • seenDays

 

The following system data collection details are returned:

  • dateFirstAudited—the first time data was collected for this system (Unix epoch time, in milliseconds);
  • dateLastAudited—the most recent data collection time (Unix epoch time, in milliseconds);
  • auditCount—the number of times that data was collected.

The following system workload collection details, for the last 30 days, are returned:

  • firstDate—the first time workload data was collected for this system (Unix epoch time, in milliseconds);
  • lastDate—the most recent workload data collection time for this system (Unix epoch time, in milliseconds);
  • totalDays—the difference in days between firstDate and lastDate;
  • seenDays—the number of days that at least one workload data was added into Densify for this system.

Note: If no workload data is collected for the system in the last 30 days, then the workloadDataLast30 element block is not returned.

Note: The values in auditInfo are updated once a day, after the data collection and RDB populate processes are complete (i.e. the reporting tables have been updated with latest data collected).

dataQuality

array of:

  • workloadName
  • firstSeen
  • lastSeen
  • completeDays
  • partialDays

 

The dataQuality array provides workload type data collection details for the system:

  • workloadName—the workload type name (see DCE Virtual Environment Workload Viewer to find a list of the supported workload types from the Analysis Console);
  • firstSeen—the first time this workload was collected (Unix Epoch time, in milliseconds);
  • lastSeen—the most recent time this workload was collected (Unix Epoch time, in milliseconds);
  • completeDays—the number of complete days that this workload data was collected;
  • partialDays—the number of partial days that this workload data was collected.

Note: The dataQuality array is only returned when the dataQuality query string is specified in the request. In addition, if you specify a workload type in the request, for which system workload data does not exist in Densify, then no data is returned.

Note: The values in the dataQuality array are updated after data collection and subsequent updates to the reporting tables (i.e. RDB Populate process) are completed.

See Example: Returning EC2 Instances with Upsize Recommendations.

Examples

Example: Returning EC2 Instances with Upsize Recommendations

The following example shows you how to return a collection of AWS instances with "Upsize" recommendations. In addition, this example also returns the "CPU Utilization", and "Disk I/O Bytes" workload data collection details.

Example: Returning ASG Downscale Recommendations

The following example shows you how to return ASG instances with "Downscale" recommendations.

Example: Returning AWS Recommendations with Low Effort in Terraform-map Form

The following example shows you how to return a collection of recommendations with Low effort in terraform-map form. The label of each recommendation (i.e. "asop-prepro-rdb-206", "ea-dev-asop-299" in the example below) is the provisioningId element.

Example: Returning an ASG Recommendation in Terraform-map Form

The following example shows you how to return a collection of ASG recommendations in terraform-map form.

Example: Downloading an Impact Analysis and Recommendation Report

The following example shows you how to download a PDF Impact Analysis and Recommendation Report from the rptHref resource element provided in the instance recommendation output.

Note:  HTTPS needs to be enabled to download the Impact Analysis and Recommendation Report PDF.

Example: Returning AWS Systems with No Recommendations

The following example shows you how to return a collection of AWS systems without recommendations. These systems typically do not have adequate data for optimization analysis and have the "Not Analyzed" designation in the recommendationType element.