Scaling policies contain the rules which trigger scaling events, based on defined metrics and thresholds.
List scaling policies
List all scaling policies, for a Scaleway Organization or Scaleway Project. By default, the policies returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
path Parameters
zoneThe zone you want to target
query Parameters
instance_group_idInstance group ID.
order_bySort order of Instance groups in the response.
pagePage number to return, from the paginated results.
page_sizeNumber of scaling policies to return per page.
List scaling policies › Responses
Paginated list of policies.
total_countCount of all policies matching the requested criteria.
Create scaling policy
Create a new scaling policy. You must specify a policy_id, capacity and Load Balancer object.
path Parameters
zoneThe zone you want to target
Create scaling policy › Request Body
nameName of the policy.
actionAction to execute when the metric-based condition is met.
typeHow to use the number defined in value when determining by how many Instances to scale up/down.
valueValue representing the magnitude of the scaling action to take for the Instance group. Depending on the type parameter, this number could represent a total number of Instances in the group, a number of Instances to add, or a percentage to scale the group by.
instance_group_idInstance group ID related to this policy.
Cockpit metric to use when determining whether to trigger a scale up/down action.
priorityPriority of this policy compared to all other scaling policies. This determines the processing order. The lower the number, the higher the priority.
Create scaling policy › Responses
idScaling policy ID.
nameName of scaling policy.
Managed metric to use for this policy. These are available by default in Cockpit without any configuration or node_exporter. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
actionAction to execute when the metric-based condition is met.
typeHow to use the number defined in value when determining by how many Instances to scale up/down.
valueNumber representing the magnitude of the scaling action to take for the Instance group.
priorityPriority of this policy compared to all other scaling policies. The lower the number, the higher the priority (higher priority will be processed sooner in the order).
instance_group_idInstance group ID related to this policy.
zoneZone for this resource.
Get scaling policy
Retrieve information about an existing scaling policy, specified by its policy_id. Its full details are returned in the response object.
path Parameters
zoneThe zone you want to target
policy_idPolicy ID.
Get scaling policy › Responses
idScaling policy ID.
nameName of scaling policy.
Managed metric to use for this policy. These are available by default in Cockpit without any configuration or node_exporter. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
actionAction to execute when the metric-based condition is met.
typeHow to use the number defined in value when determining by how many Instances to scale up/down.
valueNumber representing the magnitude of the scaling action to take for the Instance group.
priorityPriority of this policy compared to all other scaling policies. The lower the number, the higher the priority (higher priority will be processed sooner in the order).
instance_group_idInstance group ID related to this policy.
zoneZone for this resource.
Delete scaling policy
Delete an existing scaling policy, specified by its policy_id. Deleting a scaling policy is permanent, and cannot be undone.
path Parameters
zoneThe zone you want to target
policy_idID of the policy to delete.
Delete scaling policy › Responses
Update scaling policy
Update the parameters of an existing scaling policy, specified by its policy_id.
path Parameters
zoneThe zone you want to target
policy_idPolicy ID to update.
Update scaling policy › Request Body
namePolicy name to update.
Metric specification to update (Cockpit metric to use when determining whether to trigger a scale up/down action).
actionAction to update (action to execute when the metric-based condition is met).
typeType to update (how to use the number defined in value when determining by how many Instances to scale up/down).
valueValue to update (number representing the magnitude of the scaling action to take for the Instance group).
priorityPriority to update (priority of this policy compared to all other scaling policies. The lower the number, the higher the priority).
Update scaling policy › Responses
idScaling policy ID.
nameName of scaling policy.
Managed metric to use for this policy. These are available by default in Cockpit without any configuration or node_exporter. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
actionAction to execute when the metric-based condition is met.
typeHow to use the number defined in value when determining by how many Instances to scale up/down.
valueNumber representing the magnitude of the scaling action to take for the Instance group.
priorityPriority of this policy compared to all other scaling policies. The lower the number, the higher the priority (higher priority will be processed sooner in the order).
instance_group_idInstance group ID related to this policy.
zoneZone for this resource.