Zudoku
Unikraft Cloud Platform API

Autoscale

Server

Services allow you to load balance traffic for an Internet-facing service like a webserver by creating multiple instances within the same service. While you can add or remove instances to a service to scale your service, doing this manually makes it hard to react to changes in service load. On the other hand, always keeping a large number of instances running to cope with bursts is not an option either. This is where autoscale comes into play. With autoscale enabled, Unikraft Cloud takes the heavy lifting of constantly monitoring the load of your service and automatically creates or deletes instances as needed.


List Autoscale Configurations

GET
https://api.sfo.unikraft.cloud
/v1/services/autoscale

List autoscale configurations for the specified service groups.

List Autoscale Configurations › query Parameters

uuid
​string[]

The UUID of the resource.

name
​string[]

The name of the resource.

List Autoscale Configurations › Request Body

An identifier for a resource — either a name or a UUID, but not both.
uuid
​string · uuid

The UUID of the resource.

name
​string

The name of the resource.

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: uuid
type = object · requires: name
Properties for Variant 1:
uuid
​string · uuid · required

The UUID of the resource.

name
​string

The name of the resource.

List Autoscale Configurations › Responses

200

The request has succeeded.

The response message for a GetAutoscaleConfigurationsRequest.
status
​string · enum · required

The status of the response.

Enum values:
success
error
unconfigured
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Create Autoscale Configurations

POST
https://api.sfo.unikraft.cloud
/v1/services/autoscale

Create one or more autoscale configurations for the specified service groups.

Create Autoscale Configurations › Request Body

​object · required

The arguments to use when creating instances.

uuid
​string · uuid

The UUID of the resource.

name
​string

The name of the resource.

min_size
​integer · int64

The minimum number of instances to keep running.

max_size
​integer · int64

The maximum number of instances to keep running.

warmup_time_ms
​integer · int64

The warmup time in milliseconds for new instances.

cooldown_time_ms
​integer · int64

The cooldown time in milliseconds for the autoscale configuration.

The policies to apply to the autoscale configuration.

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: uuid
type = object · requires: name
Properties for Variant 1:
uuid
​string · uuid · required

The UUID of the resource.

name
​string

The name of the resource.

min_size
​integer · int64

The minimum number of instances to keep running.

max_size
​integer · int64

The maximum number of instances to keep running.

warmup_time_ms
​integer · int64

The warmup time in milliseconds for new instances.

cooldown_time_ms
​integer · int64

The cooldown time in milliseconds for the autoscale configuration.

​object

The arguments to use when creating instances.

The policies to apply to the autoscale configuration.

Create Autoscale Configurations › Responses

200

The request has succeeded.

The response to a CreateAutoscaleConfigurationRequest.
status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Delete Autoscale Configurations

DELETE
https://api.sfo.unikraft.cloud
/v1/services/autoscale

Delete autoscale configurations for the specified service groups.

Delete Autoscale Configurations › Request Body

An identifier for a resource — either a name or a UUID, but not both.
uuid
​string · uuid

The UUID of the resource.

name
​string

The name of the resource.

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: uuid
type = object · requires: name
Properties for Variant 1:
uuid
​string · uuid · required

The UUID of the resource.

name
​string

The name of the resource.

Delete Autoscale Configurations › Responses

200

The request has succeeded.

status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Get Autoscale Configurations by Service Group UUID

GET
https://api.sfo.unikraft.cloud
/v1/services/{uuid}/autoscale

Get autoscale configurations for a service group by UUID.

Get Autoscale Configurations by Service Group UUID › path Parameters

uuid
​string · uuid · required

Get Autoscale Configurations by Service Group UUID › Responses

200

The request has succeeded.

The response message for a GetAutoscaleConfigurationsRequest.
status
​string · enum · required

The status of the response.

Enum values:
success
error
unconfigured
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Create Autoscale Configuration by Service Group UUID

POST
https://api.sfo.unikraft.cloud
/v1/services/{uuid}/autoscale

Create an autoscale configuration for a service group by UUID.

Create Autoscale Configuration by Service Group UUID › path Parameters

uuid
​string · uuid · required

Create Autoscale Configuration by Service Group UUID › Request Body

The request message to create an autoscale configuration for a service group based on its UUID.
uuid
​string · uuid · required

The UUID of the service to create a configuration for.

​object · required

The arguments to use when creating instances.

min_size
​integer · int64

The minimum number of instances to keep running.

max_size
​integer · int64

The maximum number of instances to keep running.

warmup_time_ms
​integer · int64

The warmup time in milliseconds for new instances.

cooldown_time_ms
​integer · int64

The cooldown time in milliseconds for the autoscale configuration.

The policies to apply to the autoscale configuration.

Create Autoscale Configuration by Service Group UUID › Responses

200

The request has succeeded.

The response to a CreateAutoscaleConfigurationRequest.
status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Delete Autoscale Configurations by Service Group UUID

DELETE
https://api.sfo.unikraft.cloud
/v1/services/{uuid}/autoscale

Delete the autoscale configuration for a service group by UUID.

Delete Autoscale Configurations by Service Group UUID › path Parameters

uuid
​string · uuid · required

Delete Autoscale Configurations by Service Group UUID › Responses

200

The request has succeeded.

status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


List Autoscale Configuration Policies

GET
https://api.sfo.unikraft.cloud
/v1/services/{uuid}/autoscale/policies

List autoscale policies for a service group by UUID.

List Autoscale Configuration Policies › path Parameters

uuid
​string · uuid · required

List Autoscale Configuration Policies › Request Body optional

The request message to get an autoscale configuration policy by name.
name
​string · required

The Name of the policy to get.

Example: funky-policy

List Autoscale Configuration Policies › Responses

200

The request has succeeded.

status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Create Autoscale Configuration Policy

POST
https://api.sfo.unikraft.cloud
/v1/services/{uuid}/autoscale/policies

Add a new autoscale policy to a service group by UUID.

Create Autoscale Configuration Policy › path Parameters

uuid
​string · uuid · required

Create Autoscale Configuration Policy › Request Body

The request message to create an autoscale configuration policy for a service.
name
​string · required

The name of the policy.

​object · required

The policy type to add to the autoscale configuration.

Create Autoscale Configuration Policy › Responses

200

The request has succeeded.

status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Delete Autoscale Configuration Policies

DELETE
https://api.sfo.unikraft.cloud
/v1/services/{uuid}/autoscale/policies

Delete autoscale policies for a service group by UUID.

Delete Autoscale Configuration Policies › path Parameters

uuid
​string · uuid · required

Delete Autoscale Configuration Policies › Request Body

The request message to delete an autoscale configuration policy by name.
name
​string · required

The name of the policy to delete.

Delete Autoscale Configuration Policies › Responses

200

The request has succeeded.

status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Get Autoscale Configuration Policy by Name

GET
https://api.sfo.unikraft.cloud
/v1/services/{uuid}/autoscale/policies/{name}

Get an autoscale policy by name for a service group by UUID.

Get Autoscale Configuration Policy by Name › path Parameters

uuid
​string · uuid · required
name
​string · required

Get Autoscale Configuration Policy by Name › Responses

200

The request has succeeded.

status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Delete Autoscale Configuration Policy by Name

DELETE
https://api.sfo.unikraft.cloud
/v1/services/{uuid}/autoscale/policies/{name}

Delete an autoscale policy by name for a service group by UUID.

Delete Autoscale Configuration Policy by Name › path Parameters

uuid
​string · uuid · required
name
​string · required

Delete Autoscale Configuration Policy by Name › Responses

200

The request has succeeded.

status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.