弹性伸缩 AS-创建弹性伸缩配置:请求示例

时间:2024-06-24 16:12:49

请求示例

创建一个名称为as-config-tlzp,镜像ID为627a1223-2ca3-46a7-8d5f-7aef22c74ee6,规格ID为s3.xlarge.4,系统盘为40G的SATA盘,且SSH密钥名称为100vm_key的伸缩配置。
POST https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_configuration

{ 
    "scaling_configuration_name": "as-config-tlzq", 
    "instance_config": { 
        "flavorRef": "s3.xlarge.4", 
        "imageRef": "627a1223-2ca3-46a7-8d5f-7aef22c74ee6", 
        "disk": [ 
            { 
                "size": 40, 
                "volume_type": "SATA", 
                "disk_type": "SYS" 
            } 
        ], 
        "key_name": "100vm_key" ,
	"security_groups": [{
		"id": "6c22a6c0-b5d2-4a84-ac56-51090dcc33be"
	}], 
        "multi_flavor_priority_policy": "PICK_FIRST"
    } 
}
support.huaweicloud.com/api-as/as_06_0201.html