> For the complete documentation index, see [llms.txt](https://docs.cloud.olakrutrim.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloud.olakrutrim.com/sdk-guide/auto-scaling-group-sdk.md).

# Auto Scaling Group SDK

## POST /asg/v1

> Create Auto Scaling Group

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"AsgCreateRequest":{"type":"object","properties":{"vpc_krn":{"type":"string"},"instanceName":{"type":"string"},"instanceType":{"type":"string"},"instanceTypeId":{"type":"string"},"region":{"type":"string"},"sshkey_name":{"type":"string"},"vm_volume_disk_size":{"type":"string"},"volumeName":{"type":"string"},"volumeSize":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}},"image_krn":{"type":"string"},"network_krn":{"type":"string"},"security_groups":{"type":"array","items":{"type":"string"}},"subnet_id":{"type":"string"},"attach_floating_ip":{"type":"boolean"},"asg_name":{"type":"string"},"policy":{"type":"array","items":{"$ref":"#/components/schemas/Policy"}},"min":{"type":"integer"},"max":{"type":"integer"},"bootVolumeSize":{"type":"string"},"tags":{"type":"array","items":{}},"save_as_template":{"type":"boolean"}}},"Volume":{"type":"object","properties":{"count":{"type":"integer"},"volumeName":{"type":"string","nullable":true},"volumeSize":{"type":"integer"},"volumeType":{"type":"string"}}},"Policy":{"type":"object","properties":{"PredefinedMetricSpecification":{"type":"object","properties":{"PredefinedMetricType":{"type":"string"}}},"UpScaleTargetValue":{"type":"integer"},"DownScaleTargetValue":{"type":"integer"},"ScaleOutCooldown":{"type":"integer"},"ScaleInCooldown":{"type":"integer"}}}}},"paths":{"/asg/v1":{"post":{"summary":"Create Auto Scaling Group","operationId":"createAsg","parameters":[{"name":"x-region","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsgCreateRequest"}}}},"responses":{"200":{"description":"ASG created"}}}}}}
```

## POST /asg/v1/update\_asg

> Update Auto Scaling Group

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"AsgUpdateRequest":{"allOf":[{"type":"object","properties":{"asg_krn":{"type":"string"}}},{"$ref":"#/components/schemas/AsgCreateRequest"}]},"AsgCreateRequest":{"type":"object","properties":{"vpc_krn":{"type":"string"},"instanceName":{"type":"string"},"instanceType":{"type":"string"},"instanceTypeId":{"type":"string"},"region":{"type":"string"},"sshkey_name":{"type":"string"},"vm_volume_disk_size":{"type":"string"},"volumeName":{"type":"string"},"volumeSize":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}},"image_krn":{"type":"string"},"network_krn":{"type":"string"},"security_groups":{"type":"array","items":{"type":"string"}},"subnet_id":{"type":"string"},"attach_floating_ip":{"type":"boolean"},"asg_name":{"type":"string"},"policy":{"type":"array","items":{"$ref":"#/components/schemas/Policy"}},"min":{"type":"integer"},"max":{"type":"integer"},"bootVolumeSize":{"type":"string"},"tags":{"type":"array","items":{}},"save_as_template":{"type":"boolean"}}},"Volume":{"type":"object","properties":{"count":{"type":"integer"},"volumeName":{"type":"string","nullable":true},"volumeSize":{"type":"integer"},"volumeType":{"type":"string"}}},"Policy":{"type":"object","properties":{"PredefinedMetricSpecification":{"type":"object","properties":{"PredefinedMetricType":{"type":"string"}}},"UpScaleTargetValue":{"type":"integer"},"DownScaleTargetValue":{"type":"integer"},"ScaleOutCooldown":{"type":"integer"},"ScaleInCooldown":{"type":"integer"}}}}},"paths":{"/asg/v1/update_asg":{"post":{"summary":"Update Auto Scaling Group","operationId":"updateAsg","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsgUpdateRequest"}}}},"responses":{"200":{"description":"ASG updated"}}}}}}
```

## POST /asg/v1/upscale

> Upscale ASG

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"AsgUpscaleRequest":{"type":"object","properties":{"asg_krn":{"type":"string"},"vpc_krn":{"type":"string"},"desired_vm_count":{"type":"integer"},"attach_floating_ip":{"type":"boolean"}}}}},"paths":{"/asg/v1/upscale":{"post":{"summary":"Upscale ASG","operationId":"upscaleAsg","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsgUpscaleRequest"}}}},"responses":{"200":{"description":"Upscale triggered"}}}}}}
```

## POST /asg/v1/downscale

> Downscale ASG

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"AsgDownscaleRequest":{"type":"object","properties":{"asg_krn":{"type":"string"},"count":{"type":"integer"}}}}},"paths":{"/asg/v1/downscale":{"post":{"summary":"Downscale ASG","operationId":"downscaleAsg","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsgDownscaleRequest"}}}},"responses":{"200":{"description":"Downscale triggered"}}}}}}
```

## GET /asg/v1/retrieve\_asg

> Retrieve ASG

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/asg/v1/retrieve_asg":{"get":{"summary":"Retrieve ASG","operationId":"retrieveAsg","parameters":[{"name":"asg_krn","in":"query","schema":{"type":"string"}},{"name":"asg_name","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","required":true,"schema":{"type":"integer"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer"}},{"name":"x-region","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"ASG retrieved"}}}}}}
```

## GET /v1/asg/get\_asg\_krn

> Get ASG KRN by VPC

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/v1/asg/get_asg_krn":{"get":{"summary":"Get ASG KRN by VPC","operationId":"getAsgKrn","parameters":[{"name":"vpc_krn","in":"query","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":true,"schema":{"type":"integer"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"ASG KRN list"}}}}}}
```

## DELETE /asg/v1/delete\_asg/{asg\_krn}

> Delete ASG

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/asg/v1/delete_asg/{asg_krn}":{"delete":{"summary":"Delete ASG","operationId":"deleteAsg","parameters":[{"name":"asg_krn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ASG deleted"}}}}}}
```

## GET /asg/v1/get-launch-template

> Get Launch Templates

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/asg/v1/get-launch-template":{"get":{"summary":"Get Launch Templates","operationId":"getLaunchTemplates","parameters":[{"name":"vpc_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":true,"schema":{"type":"integer"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer"}},{"name":"x-region","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Templates list"}}}}}}
```

## POST /asg/v1/create-launch-template

> Create Launch Template

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"LaunchTemplateCreateRequest":{"type":"object","properties":{"vpc_krn":{"type":"string"},"instanceName":{"type":"string"},"instanceType":{"type":"string"},"region":{"type":"string"},"security_groups":{"type":"array","items":{"type":"string"}},"sshkey_name":{"type":"string"},"vm_volume_disk_size":{"type":"string"},"volumeName":{"type":"string"},"volumeSize":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}},"image_krn":{"type":"string"},"network_krn":{"type":"string"},"attach_floating_ip":{"type":"boolean"},"subnet_id":{"type":"string"},"template_name":{"type":"string"},"policy":{"type":"array","items":{"$ref":"#/components/schemas/Policy"}},"qos":{"type":"object","additionalProperties":true},"volumeType":{"type":"string"},"min":{"type":"integer"},"max":{"type":"integer"},"bootVolumeSize":{"type":"string"}}},"Volume":{"type":"object","properties":{"count":{"type":"integer"},"volumeName":{"type":"string","nullable":true},"volumeSize":{"type":"integer"},"volumeType":{"type":"string"}}},"Policy":{"type":"object","properties":{"PredefinedMetricSpecification":{"type":"object","properties":{"PredefinedMetricType":{"type":"string"}}},"UpScaleTargetValue":{"type":"integer"},"DownScaleTargetValue":{"type":"integer"},"ScaleOutCooldown":{"type":"integer"},"ScaleInCooldown":{"type":"integer"}}}}},"paths":{"/asg/v1/create-launch-template":{"post":{"summary":"Create Launch Template","operationId":"createLaunchTemplate","parameters":[{"name":"x_region","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchTemplateCreateRequest"}}}},"responses":{"200":{"description":"Launch template created"}}}}}}
```

## POST /asg/v1/update-launch-template

> Update Launch Template

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"LaunchTemplateUpdateRequest":{"type":"object","properties":{"vm_volume_disk_size":{"type":"string"},"volumeSize":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}},"bootVolumeSize":{"type":"string"},"qos":{"type":"object","additionalProperties":true},"policy":{"type":"array","items":{"type":"object","properties":{"PredefinedMetricType":{"type":"string"},"ScaleOutThreshold":{"type":"integer"},"ScaleInThreshold":{"type":"integer"},"ScaleOutCooldown":{"type":"integer"},"ScaleInCooldown":{"type":"integer"}}}}}},"Volume":{"type":"object","properties":{"count":{"type":"integer"},"volumeName":{"type":"string","nullable":true},"volumeSize":{"type":"integer"},"volumeType":{"type":"string"}}}}},"paths":{"/asg/v1/update-launch-template":{"post":{"summary":"Update Launch Template","operationId":"updateLaunchTemplate","parameters":[{"name":"template_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"template_name","in":"query","required":true,"schema":{"type":"string"}},{"name":"x_region","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchTemplateUpdateRequest"}}}},"responses":{"200":{"description":"Launch template updated"}}}}}}
```

## POST /asg/v1/delete-launch-template

> Delete Launch Template

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"servers":[{"url":"https://r1.staging.olakrutrim.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/asg/v1/delete-launch-template":{"post":{"summary":"Delete Launch Template","operationId":"deleteLaunchTemplate","parameters":[{"name":"template_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"template_name","in":"query","required":true,"schema":{"type":"string"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer"}},{"name":"x-region","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Launch template deleted"}}}}}}
```

## The AsgCreateRequest object

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"components":{"schemas":{"AsgCreateRequest":{"type":"object","properties":{"vpc_krn":{"type":"string"},"instanceName":{"type":"string"},"instanceType":{"type":"string"},"instanceTypeId":{"type":"string"},"region":{"type":"string"},"sshkey_name":{"type":"string"},"vm_volume_disk_size":{"type":"string"},"volumeName":{"type":"string"},"volumeSize":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}},"image_krn":{"type":"string"},"network_krn":{"type":"string"},"security_groups":{"type":"array","items":{"type":"string"}},"subnet_id":{"type":"string"},"attach_floating_ip":{"type":"boolean"},"asg_name":{"type":"string"},"policy":{"type":"array","items":{"$ref":"#/components/schemas/Policy"}},"min":{"type":"integer"},"max":{"type":"integer"},"bootVolumeSize":{"type":"string"},"tags":{"type":"array","items":{}},"save_as_template":{"type":"boolean"}}},"Volume":{"type":"object","properties":{"count":{"type":"integer"},"volumeName":{"type":"string","nullable":true},"volumeSize":{"type":"integer"},"volumeType":{"type":"string"}}},"Policy":{"type":"object","properties":{"PredefinedMetricSpecification":{"type":"object","properties":{"PredefinedMetricType":{"type":"string"}}},"UpScaleTargetValue":{"type":"integer"},"DownScaleTargetValue":{"type":"integer"},"ScaleOutCooldown":{"type":"integer"},"ScaleInCooldown":{"type":"integer"}}}}}}
```

## The AsgUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"components":{"schemas":{"AsgUpdateRequest":{"allOf":[{"type":"object","properties":{"asg_krn":{"type":"string"}}},{"$ref":"#/components/schemas/AsgCreateRequest"}]},"AsgCreateRequest":{"type":"object","properties":{"vpc_krn":{"type":"string"},"instanceName":{"type":"string"},"instanceType":{"type":"string"},"instanceTypeId":{"type":"string"},"region":{"type":"string"},"sshkey_name":{"type":"string"},"vm_volume_disk_size":{"type":"string"},"volumeName":{"type":"string"},"volumeSize":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}},"image_krn":{"type":"string"},"network_krn":{"type":"string"},"security_groups":{"type":"array","items":{"type":"string"}},"subnet_id":{"type":"string"},"attach_floating_ip":{"type":"boolean"},"asg_name":{"type":"string"},"policy":{"type":"array","items":{"$ref":"#/components/schemas/Policy"}},"min":{"type":"integer"},"max":{"type":"integer"},"bootVolumeSize":{"type":"string"},"tags":{"type":"array","items":{}},"save_as_template":{"type":"boolean"}}},"Volume":{"type":"object","properties":{"count":{"type":"integer"},"volumeName":{"type":"string","nullable":true},"volumeSize":{"type":"integer"},"volumeType":{"type":"string"}}},"Policy":{"type":"object","properties":{"PredefinedMetricSpecification":{"type":"object","properties":{"PredefinedMetricType":{"type":"string"}}},"UpScaleTargetValue":{"type":"integer"},"DownScaleTargetValue":{"type":"integer"},"ScaleOutCooldown":{"type":"integer"},"ScaleInCooldown":{"type":"integer"}}}}}}
```

## The AsgUpscaleRequest object

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"components":{"schemas":{"AsgUpscaleRequest":{"type":"object","properties":{"asg_krn":{"type":"string"},"vpc_krn":{"type":"string"},"desired_vm_count":{"type":"integer"},"attach_floating_ip":{"type":"boolean"}}}}}}
```

## The AsgDownscaleRequest object

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"components":{"schemas":{"AsgDownscaleRequest":{"type":"object","properties":{"asg_krn":{"type":"string"},"count":{"type":"integer"}}}}}}
```

## The LaunchTemplateCreateRequest object

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"components":{"schemas":{"LaunchTemplateCreateRequest":{"type":"object","properties":{"vpc_krn":{"type":"string"},"instanceName":{"type":"string"},"instanceType":{"type":"string"},"region":{"type":"string"},"security_groups":{"type":"array","items":{"type":"string"}},"sshkey_name":{"type":"string"},"vm_volume_disk_size":{"type":"string"},"volumeName":{"type":"string"},"volumeSize":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}},"image_krn":{"type":"string"},"network_krn":{"type":"string"},"attach_floating_ip":{"type":"boolean"},"subnet_id":{"type":"string"},"template_name":{"type":"string"},"policy":{"type":"array","items":{"$ref":"#/components/schemas/Policy"}},"qos":{"type":"object","additionalProperties":true},"volumeType":{"type":"string"},"min":{"type":"integer"},"max":{"type":"integer"},"bootVolumeSize":{"type":"string"}}},"Volume":{"type":"object","properties":{"count":{"type":"integer"},"volumeName":{"type":"string","nullable":true},"volumeSize":{"type":"integer"},"volumeType":{"type":"string"}}},"Policy":{"type":"object","properties":{"PredefinedMetricSpecification":{"type":"object","properties":{"PredefinedMetricType":{"type":"string"}}},"UpScaleTargetValue":{"type":"integer"},"DownScaleTargetValue":{"type":"integer"},"ScaleOutCooldown":{"type":"integer"},"ScaleInCooldown":{"type":"integer"}}}}}}
```

## The LaunchTemplateUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"components":{"schemas":{"LaunchTemplateUpdateRequest":{"type":"object","properties":{"vm_volume_disk_size":{"type":"string"},"volumeSize":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}},"bootVolumeSize":{"type":"string"},"qos":{"type":"object","additionalProperties":true},"policy":{"type":"array","items":{"type":"object","properties":{"PredefinedMetricType":{"type":"string"},"ScaleOutThreshold":{"type":"integer"},"ScaleInThreshold":{"type":"integer"},"ScaleOutCooldown":{"type":"integer"},"ScaleInCooldown":{"type":"integer"}}}}}},"Volume":{"type":"object","properties":{"count":{"type":"integer"},"volumeName":{"type":"string","nullable":true},"volumeSize":{"type":"integer"},"volumeType":{"type":"string"}}}}}}
```

## The Volume object

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"components":{"schemas":{"Volume":{"type":"object","properties":{"count":{"type":"integer"},"volumeName":{"type":"string","nullable":true},"volumeSize":{"type":"integer"},"volumeType":{"type":"string"}}}}}}
```

## The Policy object

```json
{"openapi":"3.0.3","info":{"title":"ASG Service API","version":"1.0.0"},"components":{"schemas":{"Policy":{"type":"object","properties":{"PredefinedMetricSpecification":{"type":"object","properties":{"PredefinedMetricType":{"type":"string"}}},"UpScaleTargetValue":{"type":"integer"},"DownScaleTargetValue":{"type":"integer"},"ScaleOutCooldown":{"type":"integer"},"ScaleInCooldown":{"type":"integer"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cloud.olakrutrim.com/sdk-guide/auto-scaling-group-sdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
