Analysis: Azure Recommendations
Analysis: Azure Recommendations
#340510
Description
The /analysis/cloud/azure/<analysisId>/results resource is used to return a collection of Azure Virtual Machine instance recommendations after the optimization analysis has been performed on your collected Azure infrastructure data.
For each instance recommendation, you can also download a PDF version of the Impact Analysis and Recommendation Report, which details system impact based on the recommendation. This report is useful to application owners who need to review recommended changes to their application resources. See the rptHref resource element for details on how to download this report.
To return a collection of all instances included in an Azure optimization analysis, see Analysis: Azure Systems.
To see the catalog map for a selected instance, see Systems: Analysis Details
Note: When using the Densify API only one subscription is processed per analysis This is the case, even if more than one subscription is associated with the service principle. If the connection was created through the Cloud Connection wizard in the UI, all subscriptions that were selected, when the connection was created, and associated with the <analysisId>are returned.
Resource
/analysis/cloud/azure/<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: Azure Recommendations Supported Operations
HTTP Method |
Input |
Output |
Description |
Path Parameter: Query String Parameter Options: Accept:
|
Collection of (JSON):
Collection of VMSS-specific in JSON format: |
Returns a collection of recommendations for an Azure analysis. Specify application/json in the request header for recommendations to be returned in JSON format. |
|
GET /analysis/cloud/azure/ <analysisId>/results |
Path Parameter: Query String Parameter Options: Accept:
|
Collection of the following details in Terraform-map format:
Collection of VMSS-specific details in Terraform-map format: |
Returns a collection of recommendations for an Azure analysis. Specify application/terraform-map in the request header forrecommendations to be returned in Terraform-map format. Example: Returning Azure Recommendations with Low Effort in Terraform-map Format |
Table: Azure Recommendations Path Parameters
Parameter Name |
Type |
Description |
string |
The unique referenced ID of the Azure 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. |
Table: Azure Recommendation Query String Parameters
Parameter Name |
Type |
Description |
string |
You can use element filters to return a targeted 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 |
|
|
Indicate whether or not to return system attributes:
Usage example: ../results?includeAttributes=true |
|
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. 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. |
Table: Azure Recommendations Response Schema
Element |
Type |
Filter/Sort |
Description |
string |
F |
The Densify assigned entity ID of the cloud system. |
|
string |
F |
The Azure identifier assigned to the instance system. |
|
string |
F |
The Azure subscription identifier. |
|
string |
F |
The region containing the instance. |
|
string |
F |
The current instance type. |
|
string |
F |
The recommended action for the system. This is also known as the Optimization Type in the Densify Console The following types of recommended actions are supported for this cloud platform:
For VM Scale Sets, additional recommendation actions are supported:
Use recommendationType as a filter to retrieve only system actions of interest. Systems with insufficient information for analysis do not have a recommendation and are returned with limited elements. See Example: Returning Azure Systems with No Recommendations. |
|
string |
F |
The recommended instance type after Densify optimization analysis. |
|
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 VM Scale Sets with more than one VM instance, as a result this element is not returned for these VM Scale Sets. |
|
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. |
|
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. |
|
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. |
|
string |
F |
The Azure name assigned to the system. |
|
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: Note: HTTPS must be enabled to download the Impact Analysis and Recommendation Report PDF. See Note: The Impact Analysis and Recommendation Report report is not currently available for VM Scale Sets with maximum size >1. Example: Downloading an Impact Analysis and Recommendation Report |
|
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 settings include:
|
|
string |
F |
The Densify policy used for optimization analysis. |
|
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. [currentCost – recommendedCost]). 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.
This calculation also applies to scale groups with maximum group size = 1. In this case, the scale group is considered as a VM, with no running instance elements exposed. For scale groups 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. [avgInstanceCountCurrent * currentCost] - [avgInstanceCountRecommended* recommendedCost]). |
|
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’. |
|
string |
F |
The power state of Azure VMs. The power state is not available for VM Scale Set. Power state is not shown in the UI. . |
|
string |
F |
The Densify entity ID of the catalog instance for the recommended instance type. |
|
string |
|
The cost of the existing instance type (i.e. the instance catalog cost). |
|
string |
|
The cost of the recommended instance type (i.e. the instance catalog cost) after Densify optimization analysis. |
|
string |
F |
The Azure cloud service type. Possible settings include:
Scale groups with maximum group size of 1 (i.e. maxGroupCurrent=1) have serviceType=VM Scale Set. All other returned elements are similar to those for a virtual machine service (i.e. min/max group size values are not returned). |
|
string |
|
The hourly rate for the current instance type (i.e. instance catalog cost / monthly hours). This value is rounded to the nearest penny. |
|
string |
|
The hourly rate for the recommended instance type (i.e. instance catalog cost / monthly hours). This value is rounded to the nearest penny. |
|
array of:
|
|
System attributes are properties set during the data collection process by a vendor platform (i.e. Azure) or by Densify for analytics. Note: The attribute array is only returned when includeAttributes=true is added to the query string. |
|
string |
|
This element is used to identify the terraform-map recommendations for a unique system and corresponds to the "Provisioning Id" Azure user-defined resource tag value. The "Provisioning Id" resource 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 Azure Recommendations with Low Effort in Terraform-map Format If the "Provisioning Id" user-defined resource tag value is not set, then the system name is used to identify the recommendations. |
|
Unix time |
|
The first date and time the recommended instance type (i.e. the recommendedType element) was provided by Densify (Unix Epoch time, in milliseconds). |
|
Unix time |
|
The latest date and time the recommended instance type (i.e. the recommendedType element) was provided by Densify (Unix Epoch time, in milliseconds). |
|
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. |
|
|
|
The following system data collection details are returned:
The following system workload collection details, for the last 30 days, are returned:
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). |
|
array of:
|
|
The dataQuality array provides workload type data collection details for the system:
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. |
|
Scale Group Details |
|||
The following details are returned for scale groups with maximum size > 1. Scale groups with maximum size = 1 are treated as VMs. |
|||
string |
|
The orchestration mode applied to this VM Scale Set. The orchestration mode can:
Only Uniform scale sets, or Flexible scale sets running identical instance types are analyzed. See Mixed Mode Services for details. |
|
string |
|
The scaling mode applied to this VM Scale Set can be one of:
If set to Flexible, the scale set must be running the same instance types. |
|
integer |
|
The number of profiles associated with the selected VM Scale Set. Profiles are only applicable to scale sets with scaling mode=Autoscale. |
|
integer |
|
Specifies the current minimum group size of a scaling group. |
|
integer |
|
Specifies the recommended minimum group size for a scaling group. |
|
integer |
|
Specifies the current maximum group size of a scale group. |
|
integer |
|
Specifies the recommended maximum group size for a scale group. |
|
float |
|
The average of in-service instances over the historical interval (or workload range). This interval is defined by your policy (e.g. over the last 60 days). |
|
float |
|
The predicted average instance count if the scale group recommendations are implemented. |
|
string |
This value indicates whether the scaling mode needs to be reviewed. Possible values depend on whether or not the VM Scale Set is managed by AKS:
This element is only returned for scale groups with maximum group size greater than one. |
Examples
Example: Returning Azure VM Scale Sets
The following example shows you how to return a collection of Azure recommendations for VM Scale Set.

GET /analysis/cloud/azure/b585963b-2f05-62a4-b146-1facd95a8f0d/results?serviceType=VM+Scale+Set
Response:
{
"entityId": "0d2f5815-1dbe-439c-83e3-788180e41fb2",
"resourceId": "5de3f259-1524-4242-8419-385d3944133b",
"accountIdRef": "cc377154-9605-4cb0-8b41-1b39e1c4ac0f",
"region": "eastus",
"currentType": "standard_ds1_v2",
"recommendationType": "Just Right",
"recommendedType": "standard_ds1_v2",
"predictedUptime": 100.0,
"totalHoursRunning": 72,
"totalHours": 72,
"name": "vmss-test-set",
"rptHref": "/systems/3bcb4ced-bd8f-3264-9c71/analysis-report",
"approvalType": "na",
"densifyPolicy": "API Initial Assessment",
"savingsEstimate": 0.0,
"effortEstimate": "Impossible",
"powerState": "N/A",
"recommendedHostEntityId": "ef2c3121-3bdd-4866-9708-581ca041c5c8",
"currentCost": 53.29,
"recommendedCost": 53.29,
"serviceType": "VM Scale Set",
"currentHourlyRate": 0.07,
"recommendedHourlyRate": 0.07,
"minGroupCurrent": "0",
"minGroupRecommended": "0",
"maxGroupCurrent": "3",
"maxGroupRecommended": "3",
"avgInstanceCountRecommended": 3.0,
"avgInstanceCountCurrent": 3.0,
"recommFirstSeen": 1708025580003,
"recommLastSeen": 1709528400000,
"recommSeenCount": 9,
"auditInfo": {
"dataCollection": {
"dateFirstAudited": 1706731262210,
"dateLastAudited": 1709530216270,
"auditCount": 55
},
"workloadDataLast30": {
"firstDate": 1707022800000,
"lastDate": 1709442000000,
"totalDays": 29,
"seenDays": 29
}
},
"orchestrationMode": "Uniform",
"scalingMode": "Manual",
"profiles": 1,
"scalingPolicies": "Keep"
},
Example: Returning Azure Instances with Terminate Recommendations
The following example shows you how to return a collection of Azure instances with "Terminate" recommendations.

Request:
GET /analysis/cloud/azure/b585963b-2f05-62a4-b146-1facd95a8f0d/results?recommendationType=Terminate
Response:
[
{
"entityId": "0d2f5815-1dbe-439c-83e3-788180e41fb2",
"resourceId": "952d21d6-9ba2-4217-8df1-f5f6417ded45",
"accountIdRef": "3d4ba999-cbd8-40b8-9998-574be6824a97",
"region": "centralus",
"currentType": "standard_d2",
"recommendationType": "Terminate",
"recommendedType": "idle.guest",
"implementationMethod": "N/A",
"predictedUptime": 18.33,
"name": "st01-dev-est-125",
"rptHref": "/systems/0d2f5815-1dbe-439c-83e3-788180e41fb2/analysis-report",
"approvalType": "na",
"densifyPolicy": "Initial Assessment",
"savingsEstimate": 95.107315,
"effortEstimate": "Low",
"powerState": "Running",
"recommendedHostEntityId": "e4175f48-cf28-459a-b573-3da48948a82e",
"currentCost": 112.42,
"recommendedCost": 0.0,
"serviceType": "Virtual Machine",
"currentHourlyRate": 0.15,
"recommendedHourlyRate": 0.00,
"recommFirstSeen": 1579680587640,
"recommLastSeen": 1589008760283,
"recommSeenCount": 24,
"auditInfo": {
"dataCollection": {
"dateFirstAudited": 1571949479093,
"dateLastAudited": 1588997132800,
"auditCount": 104
},
"workloadDataLast30": {
"firstDate": 1587009600000,
"lastDate": 1588910400000,
"totalDays": 23,
"seenDays": 6
}
}
}
...
]
Example: Returning Azure Recommendations with Low Effort in Terraform-map Format
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. "st01-dev-west-108", "st01-dev-west-110" in the example below) is the provisioningId element: "Provisioning Id" Azure user-defined resource tag or system name value.

Request:
GET /analysis/cloud/azure/b585963b-2f05-62a4-b146-1facd95a8f0d/results?effortEstimate=Low
Headers:
Accept: application/terraform-map
Authorization: Bearer <apiToken>
Response:
densify_recommendations = {
"st01-dev-west-108" = {
currentType = "standard_d2"
recommendedType = "standard_b2ms"
approvalType = "na"
predictedUptime = "93.56"
recommendationType = "Modernize - Optimal Family"
powerState = "Running"
implementationMethod = "Self Optimization"
savingsEstimate = "128.94438"
effortEstimate = "Low"
densifyPolicy = "Azure Assessement"
}
"st01-dev-west-110" = {
currentType = "standard_a1_v2"
recommendedType = "standard_b1ms"
approvalType = "na"
...
}
...
}
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 must be enabled to download the Impact Analysis and Recommendation Report PDF.
Example: Returning Azure Systems with No Recommendations
The following example shows you how to return a collection of Azure systems without recommendations. These systems typically do not have adequate data for optimization analysis and have the "Not Analyzed" designation in the recommendationType element.

Request:
GET /analysis/cloud/azure/6b8ab8e1-a026-4db9-a4ae-2d684446731f/results?recommendationType=Not Analyzed
Headers:
Accept: application/json
Authorization: Bearer <apiToken>
Response:
[
{
"entityId": "1123ea6b-0bdb-4382-9daa-5a597b9f2db4",
"resourceId": "7a5316a0-4063-4123-a036-3625fea91033",
"accountIdRef": "3d4ba999-cbd8-40b8-9998-574be6824a88",
"region": "centralus",
"currentType": "standard_ds3_v2",
"recommendationType": "Not Analyzed",
"name": "st08-est-catf-619",
"densifyPolicy": "Azure Assess",
"powerState": "Offline",
"currentCost": 13.14,
"serviceType": "Virtual Machine",
"recommFirstSeen": 1579680587623,
"recommLastSeen": 1589008760263,
"recommSeenCount": 24,
"auditInfo": {
"dataCollection": {
"dateFirstAudited": 1571949479093,
"dateLastAudited": 1588997132800,
"auditCount": 104
}
}
},
...
]

Request:
GET /analysis/cloud/azure/6b8ab8e1-a026-4db9-a4ae-2d684446731f/results?recommendationType=Not Analyzed
Headers:
Accept: application/terraform-map
Authorization: Bearer <apiToken>
Response:
densify_recommendations = {
"st08-est-catf-619" = {
currentType = "standard_ds3_v2"
recommendationType = "Not Analyzed"
powerState = "Offline"
densifyPolicy = "Azure Assess"
}
...
}