anchor.diff:  + Request (application/json)
   
           {
  -          "alarms": [
  -            {
  -              "alarmName": "cron_worktime",
  -              "description": "Number of nodes during worktime",
  -              "timeZone": "Europe/Budapest",
  -              "cron": "0 00 09 ? * MON-FRI"
  -            }
  -          ]
  -        }
  -
  -+ Response 201 (application/json)
  -
  -      {
  -        "alarms": [
  -          {
  -            "cron": "0 00 09 ? * MON-FRI",
  -            "timeZone": "Europe/Budapest",
  -            "notifications": [],
  -            "scalingPolicyId": null,
  -            "description": "Number of nodes during worktime",
  -            "alarmName": "cron_worktime",
  -            "id": 100
  -          }
  -        ]
  -      }
  -
  -###Add an alarm [PUT]
  -
  -+ Parameters
  -    + clusterId (required String `clusterID`) ... The id of the cluster.
  -
  -+ Request (application/json)
  -
  -      {
  -        "alarmName": "cron_worktime",
  -        "description": "Number of nodes during worktime",
  -        "timeZone": "Europe/Budapest",
  -        "cron": "0 00 09 ? * MON-FRI"
  -      }
  -
  -+ Response 201 (application/json)
  -
  -      {
  -        "alarms": [
  -          {
  -            "cron": "0 00 09 ? * MON-FRI",
  -            "timeZone": "Europe/Budapest",
  -            "notifications": [],
  -            "scalingPolicyId": null,
  -            "description": "Number of nodes during worktime",
  -            "alarmName": "cron_worktime",
  -            "id": 100
  -          },
  -          {
  -            "cron": "0 00 09 ? * MON-FRI",
  -            "timeZone": "Europe/Budapest",
  -            "notifications": [],
  -            "scalingPolicyId": null,
  -            "description": "Number of nodes during worktime",
  -            "alarmName": "cron_worktime",
  -            "id": 101
  -          }
  -        ]
  -      }
  -
  -###Retrieve configured alarms [GET]
  -
  -+ Parameters
  -    + clusterId (required String `clusterID`) ... The id of the cluster.
  -
  -+ Request (application/json)
  -
  -        {
  -
  -        }
  -
  -+ Response 201 (application/json)
  -
  -      {
  -        "alarms": [
  -          {
  -            "cron": "0 00 09 ? * MON-FRI",
  -            "timeZone": "Europe/Budapest",
  -            "notifications": [],
  -            "scalingPolicyId": null,
  -            "description": "Number of nodes during worktime",
  -            "alarmName": "cron_worktime",
  -            "id": 100
  -          },
  -          {
  -            "cron": "0 00 09 ? * MON-FRI",
  -            "timeZone": "Europe/Budapest",
  -            "notifications": [],
  -            "scalingPolicyId": null,
  -            "description": "Number of nodes during worktime",
  -            "alarmName": "cron_worktime",
  -            "id": 101
  -          }
  -        ]
  -      }
  +
  +        }
  +
  ++ Response 200 (application/json)
  +
  +      [
  +        {
  +          "id": 152,
  +          "alarmName": "cron-worktime-modified",
  +          "description": "Number of nodes during worktime",
  +          "scalingPolicyId": null,
  +          "notifications": [],
  +          "timeZone": "Europe/Budapest",
  +          "cron": "0 39 16 ? * MON-FRI"
  +        },
  +        {
  +          "id": 153,
  +          "alarmName": "cron-worktime",
  +          "description": "Number of nodes during worktime",
  +          "scalingPolicyId": null,
  +          "notifications": [],
  +          "timeZone": "Europe/Budapest",
  +          "cron": "0 24 15 ? * MON-FRI"
  +        }
  +      ]
   
   ##Delete [/clusters/{clusterId}/alarms/time/{alarmId}]
   ###Delete an alarm [DELETE]
  
positive.code: An SLA scaling policy can contain multiple alarms. As an alarm is triggered a `scalingAdjustment` is applied, however to keep the cluster size within boundaries a `minSize` and `maxSize` is attached to the cluster - thus a scaling policy can never over or undersize a cluster. Also in order to avoid stressing the cluster we have introduced a `cooldown` period (minutes) - though an alarm is raised and there is an associated scaling policy, the system will not apply the policy within the configured timeframe. In an SLA scaling policy the triggered rules are applied in order.
  Hosts can be added or removed from specific `hostgroups` - Ambari host groups are a set of machines with the same Hadoop “components” installed.
  
  ##Add, remove and show [/clusters/{clusterId}/policies]
  ###Set the scaling policies. [POST]
  
  + Parameters
      + clusterId (required String `clusterID`) ... The id of the cluster.
  
  + Request (application/json)
  
          {
            "minSize": 2,
            "maxSize": 10,
            "cooldown": 35,
            "scalingPolicies": [
              {
                "name": "downScaleWhenHighResource",
                "adjustmentType": "NODE_COUNT",
                "scalingAdjustment": -2,
                "hostGroup": "slave_1",
                "alarmId": "51"
              },
              {
                "name": "upScaleWhenHighPendingContainers",
                "adjustmentType": "EXACT",
                "scalingAdjustment": 40,
                "hostGroup": "slave_1",
                "alarmId": "50"
              }
            ]
          }
  
  + Response 201 (application/json)
  
          {
            "cooldown": 35,
            "scalingPolicies": [
              {
                "alarmId": 50,
                "scalingAdjustment": 40,
                "hostGroup": "slave_1",
                "adjustmentType": "EXACT",
                "name": "upScaleWhenHighPendingContainers",
                "id": 101
              },
              {
                "alarmId": 51,
                "scalingAdjustment": -2,
                "hostGroup": "slave_1",
                "adjustmentType": "NODE_COUNT",
                "name": "downScaleWhenHighResource",
                "id": 100
              }
            ],
            "maxSize": 10,
            "minSize": 2
          }
  
  ###Add a scaling policy. [PUT]
  
  + Parameters
      + clusterId (required String `clusterID`) ... The id of the cluster.
  
  + Request (application/json)
  
          {
            "name": "upScaleWhenHighUnhealthyNodes",
            "adjustmentType": "NODE_COUNT",
            "scalingAdjustment": 5,
            "hostGroup": "slave_1",
            "alarmId": "102"
          }
  
  + Response 201 (application/json)
  
          {
            "cooldown": 1,
            "scalingPolicies": [
              {
                "hostGroup": "slave_1",
                "alarmId": 100,
                "scalingAdjustment": 40,
                "adjustmentType": "PERCENTAGE",
                "name": "upScaleWhenHighPendingContainers",
                "id": 200
              },
              {
                "hostGroup": "slave_1",
                "alarmId": 101,
                "scalingAdjustment": -2,
                "adjustmentType": "NODE_COUNT",
                "name": "downScaleWhenHighResource",
                "id": 201
              },
              {
                "hostGroup": "slave_1",
                "alarmId": 102,
                "scalingAdjustment": 5,
                "adjustmentType": "NODE_COUNT",
                "name": "upScaleWhenHighUnhealthyNodes",
                "id": 202
              }
            ],
            "maxSize": 10,
            "minSize": 2
          }
  
  ###List the scaling policies. [GET]
  
  + Parameters
      + clusterId (required String `clusterID`) ... The id of the cluster.
  
  + Request (application/json)
  
          {
  
          }
  
  + Response 200 (application/json)
  
          {
            "cooldown": 35,
            "scalingPolicies": [
              {
                "alarmId": 50,
                "scalingAdjustment": 40,
                "hostGroup": "slave_1",
                "adjustmentType": "PERCENTAGE",
                "name": "upScaleWhenHighPendingContainers",
                "id": 101
              },
              {
                "alarmId": 51,
                "scalingAdjustment": -2,
                "hostGroup": "slave_1",
                "adjustmentType": "NODE_COUNT",
                "name": "downScaleWhenHighResource",
                "id": 100
              }
            ],
            "maxSize": 10,
            "minSize": 2
          }
  
  ##Delete [/clusters/{clusterId}/policies/{policyId}]
  ###Delete a scaling policy. [DELETE]
  
negative.code: Also a `threshold` can be configured, which specifies the variance applied by the operator for the selected `metric`.
  
  
  ##Add [/clusters/{clusterId}/alarms/metric]
  ###Create a new metric alarm [POST]
  
  + Parameters
      + clusterId (required String `clusterID`) ... The id of the cluster.
  