华为云用户手册

  • 返回值 正常 200 异常 返回值 说明 400 Bad Request 服务器未能处理请求。 401 Unauthorized 被请求的页面需要用户名和密码。 403 Forbidden 对被请求的页面访问禁止。 404 Not Found 服务器无法找到被请求的页面。 405 Method Not Allowed 请求中指定的方法不被允许。 406 Not Acceptable 服务器生成的响应无法被客户端所接受。 407 Proxy Authentication Required 用户必须首先使用代理服务器进行验证,这样请求才会被处理。 408 Request Timeout 请求超出了服务器的等待时间。 409 Conflict 由于冲突,请求无法被完成。 500 Internal Server Error 请求未完成。服务异常。 501 Not Implemented 请求未完成。服务器不支持所请求的功能。 502 Bad Gateway 请求未完成。服务器从上游服务器收到一个无效的响应。 503 Service Unavailable 请求未完成。系统暂时异常。 504 Gateway Timeout 网关超时。
  • 响应参数 表3 响应参数 参数 参数类型 描述 topic_urn String SMN 服务中Topic的唯一的资源标识 topic_scene Array of strings 通知场景,有以下五种类型。 SCALING_UP:扩容成功 SCALING_UP_FAIL:扩容失败 SCALING_DOWN:缩容成功 SCALING_DOWN_FAIL:缩容失败 SCALING_GROUP_ABNORMAL:伸缩组发生异常 topic_name String SMN服务中Topic的资源名称。
  • 操作步骤 确定调用API鉴权时使用的token。 查询token,详情请参见获取用户Token。 获取响应Header参数中X-Subject-Token对应的值。 确定待创建伸缩配置的规格。 查询云服务器规格详情列表信息,详情请参见查询云服务器规格详情列表。 根据实际需要选择规格,并记录规格的ID。 确定待创建伸缩配置使用的镜像。 查询镜像,详情请参见查询IMS镜像列表。 根据需要选择镜像,并记录镜像ID。 设置密钥对登录方式。 查询SSH密钥列表,详情请参见查询SSH密钥列表。 根据实际需要选择密钥,并记录密钥名称。 使用规格和镜像等参数创建伸缩配置。 接口相关信息 URI格式:POST /autoscaling-api/v1/{project_id}/scaling_configuration 接口请求参数说明详情,请参见创建弹性伸缩配置。 请求示例 POST: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_configuration {endpoint}信息请从地区和终端节点获取。 Body: { "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", "multi_flavor_priority_policy": "PICK_FIRST" } } 响应示例 { "scaling_configuration_id": "f8327883-6a07-4497-9a61-68c03e8e72a2"} 确认伸缩配置创建成功。 接口相关信息 URI格式:GET /autoscaling-api/v1/{project_id}/scaling_configuration/{scaling_configuration_id} 详情请参见查询弹性伸缩配置详情。 请求示例 GET: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_configuration/f8327883-6a07-4497-9a61-68c03e8e72a2 其中: f8327883-6a07-4497-9a61-68c03e8e72a2为创建的伸缩配置UUID。 {endpoint}信息请从地区和终端节点获取。 响应示例 { "scaling_configuration": { "tenant": "0605767c2e80d5762fd0c0146a10aaf2", "scaling_configuration_id": "f8327883-6a07-4497-9a61-68c03e8e72a2", "scaling_configuration_name": " config_name_1", "instance_config": { "disk": [ { "size": 40, "volume_type": "SATA", "disk_type": "SYS" }, { "size": 100, "volume_type": "SATA", "disk_type": "DATA" } ], "adminPass": "***", "personality": null, "instance_name": null, "instance_id": null, "flavorRef": "103", "imageRef": "627a1223-2ca3-46a7-8d5f-7aef22c74ee6", "key_name": "keypair01", "public_ip": null, "user_data": null, "metadata": {}, "security_groups": null, "multi_flavor_priority_policy": "PICK_FIRST" }, "create_time": "2015-07-23T01:04:07Z" }}
  • 请求示例 创建一个topic_urn为urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh的通知,在ID为e5d27f5c-dd76-4a61-b4bc-a67c5686719a的伸缩组扩容成功,扩容失败,缩容成功,缩容失败,伸缩组发生异常场景下会发送消息。 PUT https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_notification/e5d27f5c-dd76-4a61-b4bc-a67c5686719a{ "topic_urn": "urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh", "topic_scene": [ "SCALING_UP","SCALING_UP_FAIL","SCALING_DOWN","SCALING_DOWN_FAIL","SCALING_GROUP_ABNORMAL" ]}
  • 响应示例 { "topic_urn": "urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh", "topic_scene": [ "SCALING_UP","SCALING_UP_FAIL","SCALING_DOWN","SCALING_DOWN_FAIL","SCALING_GROUP_ABNORMAL" ], "topic_name": "gsh"}
  • 请求参数 表2 请求参数 参数 是否必选 参数类型 描述 topic_urn 是 String SMN服务中Topic的唯一的资源标识。创建Topic请参考《 消息通知 服务》的创建Topic。 topic_scene 是 Array of strings 通知场景,有以下五种类型。 SCALING_UP:扩容成功 SCALING_UP_FAIL:扩容失败 SCALING_DOWN:缩容成功 SCALING_DOWN_FAIL:缩容失败 SCALING_GROUP_ABNORMAL:伸缩组发生异常
  • 涉及接口 创建伸缩组时,需要进行token查询,安全组列表查询,伸缩配置列表查询等操作,涉及的接口如下: 获取 IAM 用户Token:确定调用API鉴权时使用的token。 查询VPC列表:确定待创建伸缩组使用的虚拟私有云。 查询安全组列表:确定待创建伸缩组使用的安全组。 查询子网列表:确定待创建伸缩组使用的子网。 查询弹性伸缩配置列表:确定待创建伸缩组的伸缩配置。 查询可用区列表:确定待创建伸缩组的可用区。 创建弹性伸缩组:使用VPC和伸缩配置等参数创建弹性伸缩组。 查询弹性伸缩组详情:确认伸缩组创建成功。
  • 操作步骤 确定调用API鉴权时使用的token。 查询token,详情请参见获取用户Token。 获取响应Header参数中X-Subject-Token对应的值。 确定待创建伸缩组使用的虚拟私有云。 查询VPC虚拟私有云列表,详情请参见查询VPC列表。 根据实际需要选择虚拟私有云,并记录虚拟私有云的ID。 确定待创建伸缩组使用的安全组。 查询VPC安全组列表,详情请参见查询安全组列表。 根据实际需要选择安全组,并记录安全组ID。 确定待创建伸缩组使用的子网。 根据选定的虚拟私有云ID,查询指定VPC下的子网列表,详情请参见查询子网列表。 根据实际需要选择子网,并记录子网ID。 确定待创建伸缩组的伸缩配置。 查询伸缩配置列表。 接口相关信息 URI格式:GET /autoscaling-api/v1/{project_id}/scaling_configuration 接口请求参数说明详情,请参见查询弹性伸缩配置列表。 请求示例 GET: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_configuration?start_number=0&limit=10 {endpoint}信息请从地区和终端节点获取。 响应示例 { "limit": 20, "total_number": 2, "start_number": 0, "scaling_configurations": [ { "tenant": "ce061903a53545dcaddb300093b477d2", "scaling_configuration_id": "6afe46f9-7d3d-4046-8748-3b2a1085ad86", "scaling_configuration_name": " config_name_1", "instance_config": { "disk": [ { "size": 40, "volume_type": "SATA", "disk_type": "SYS" }, { "size": 100, "volume_type": "SATA", "disk_type": "DATA" } ], "personality": null, "instance_name": null, "instance_id": null, "flavorRef": "103", "imageRef": "37ca2b35-6fc7-47ab-93c7-900324809c5c", "key_name": "keypair01", "public_ip": null, "user_data": null, "metadata": {}, "security_groups": [{ "id": "6c22a6c0-b5d2-4a84-ac56-51090dcc33be" }], }, "create_time": "2015-07-23T01:04:07Z" } ]} 根据实际需要选择伸缩配置,并记录伸缩配置ID。 确定待创建伸缩组的可用区。 查询可用域列表,详情请参见查询可用区列表。 根据实际需要选择可用区,并记录可用区名称。 使用VPC和伸缩配置等参数创建弹性伸缩组。 接口相关信息 URL格式:POST /autoscaling-api/v1/{project_id}/scaling_group 接口请求参数说明详情,请参见创建弹性伸缩组。 请求示例 POST: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_group {endpoint}信息请从地区和终端节点获取。 Body: {"scaling_group_name": "GroupNameTest","scaling_configuration_id": "47683a91-93ee-462a-a7d7-484c006f4440","desire_instance_number": 0,"min_instance_number": 0,"max_instance_number": 10,"health_periodic_audit_method": "NOVA_AUDIT","vpc_id": "a8327883-6b07-4497-9c61-68d03ee193a","available_zones": ["XXXa","XXXb"],"networks": [ { "id": "3cd35bca-5a10-416f-8994-f79169559870" }],"enterprise_project_id": "c92b1a5d-6f20-43f2-b1b7-7ce35e58e413","multi_az_priority_policy": "PICK_FIRST"} 响应示例 { "scaling_group_id": "a8327883-6b07-4497-9c61-68d03ee193a1"} 确认伸缩组创建成功。 接口相关信息 URI格式:GET /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id} 接口请求参数说明详情,请参见查询弹性伸缩组详情。 请求示例 GET: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_group/a8327883-6b07-4497-9c61-68d03ee193a1 其中: a8327883-6b07-4497-9c61-68d03ee193a1为创建的伸缩配置UUID。 {endpoint}信息请从地区和终端节点获取。 响应示例 { "scaling_group": { "networks": [ { "id": "a8327883-6b07-4497-9c61-68d03ee193a ", "ipv6_enable": true, "ipv6_bandwidth": { "id": "076ee2ff-f23e-4338-b8ac-1bc7278532d5" } } ], "available_zones": [ "XXXa", "XXXb" ], "detail": null, "scaling_group_name": "api_gateway_modify", "scaling_group_id": "d4e50321-3777-4135-97f8-9f5e9714a4b0", "scaling_group_status": "INSERVICE", "scaling_configuration_id": "53579851-3841-418d-a97b-9cecdb663a90", "scaling_configuration_name": "press", "current_instance_number": 7, "desire_instance_number": 8, "min_instance_number": 0, "max_instance_number": 100, "cool_down_time": 900, "lb_listener_id": null, "security_groups": [ { "id": "23b7b999-0a30-4b48-ae8f-ee201a88a6ab" } ], "create_time": "2015-09-01T08:36:10Z", "vpc_id": "3e22f934-800d-4bb4-a588-0b9a76108190", "health_periodic_audit_method": "NOVA_AUDIT", "health_periodic_audit_time": 5, "health_periodic_audit_grace_period": 600, "instance_terminate_policy": "OLD_CONFIG_OLD_INSTANCE", "is_scaling": true, "delete_publicip": false, "notifications": null, "enterprise_project_id": "c92b1a5d-6f20-43f2-b1b7-7ce35e58e413", "activity_type": "MODIFY_ELB", "multi_az_priority_policy": "PICK_FIRST" }}
  • 涉及接口 创建伸缩配置时,需要进行token查询,云服务器规格查询,镜像列表查询,伸缩配置创建等操作,涉及的接口如下: 获取IAM用户Token:确定调用API鉴权时使用的token。 查询云服务器规格详情列表:确定待创建伸缩配置的规格。 查询镜像列表:确定待创建伸缩配置使用的镜像。 查询SSH密钥列表:设置密钥对登录方式。 创建弹性伸缩配置:使用规格和镜像等参数创建伸缩配置。 查询弹性伸缩配置详情:确认伸缩配置创建成功。
  • 弹性伸缩策略 权限 对应API接口 授权项 IAM项目 (Project) 企业项目 (Enterprise Project) 创建弹性伸缩策略 POST /autoscaling-api/v1/{project_id}/scaling_policy as:policies:create √ √ 修改弹性伸缩策略 PUT /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id} as:policies:update √ √ 查询弹性伸缩策略列表 GET /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_group_id}/list as:policies:list √ √ 查询弹性伸缩策略详情 GET /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id} as:policies:get √ √ 执行或启用或停止弹性伸缩策略 POST /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}/action as:policies:action √ √ 删除弹性伸缩策略 DELETE /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id} as:policies:delete √ √ 创建弹性伸缩策略 POST /autoscaling-api/v2/{project_id}/scaling_policy as:policies:create √ √ 修改弹性伸缩策略 PUT /autoscaling-api/v2/{project_id}/scaling_policy/{scaling_policy_id} as:policies:update √ √ 查询弹性伸缩策略列表 GET /autoscaling-api/v2/{project_id}/scaling_policy/{scaling_resource_id}/list as:policies:list √ √ 查询弹性伸缩策略列表 GET /autoscaling-api/v2/{project_id}/scaling_policy{? scaling_resource_id, scaling_resource_type,scaling_policy_name, scaling_policy_id,scaling_policy_type,start_number,limit,sort_by,order,enterprise_project_id} as:groups:get as:policies:list √ √ 查询弹性伸缩策略详情 GET /autoscaling-api/v2/{project_id}/scaling_policy/{scaling_policy_id} as:policies:get √ √ 批量操作弹性伸缩策略 POST /autoscaling-api/v1/{project_id}/scaling_policies/action as:policies:batchAction √ √ 父主题: 权限和授权项
  • 配额 权限 对应API接口 授权项 IAM项目 (Project) 企业项目 (Enterprise Project) 查询配额 GET /autoscaling-api/v1/{project_id}/quotas as:quotas:get √ √ 查询弹性伸缩策略和伸缩实例配额 GET /autoscaling-api/v1/{project_id}/quotas/{scaling_group_id} as:quotas:get √ √ 父主题: 权限和授权项
  • 错误码说明 当您调用API时,如果遇到“APIGW”开头的错误码,请参见API网关错误码进行处理。 状态码 错误码 错误信息 描述 处理措施 500 AS.0001 System error. 系统错误 请稍后重试或联系技术支持 500 AS.0049 Call IAM failed. 调用IAM接口失败 请稍后重试或联系技术支持 400 AS.0002 Request body is null. 消息体为空 请传入有效消息体 401 AS.0005 The token of the header in the request is null. 请求消息头未携带token或者token为空 请传入有效token 401 AS.0006 The token of the header in the request is incorrect. 请求消息头携带的token不正确、非法或已过期 请传入有效token 404 AS.0007 The requested resource [%s] could not be found. 请求的资源未找到 请使用正确的参数值 400 AS.0008 Incorrect ProjectID. URL中携带的project id和从token中解析到的project id不一致 检查URL参数或者token是否匹配 403 AS.0011 You do not have the rights to perform the operation. 角色权限错误 检查用户角色是否包含te_admin、as_adm或者其他需要的角色,并检查是否已经实名认证 403 AS.0012 The user role is suspended. 角色权限被冻结 检查用户角色是否包含冻结角色op_suspended 403 AS.0013 Your rights to perform the operation are disabled. 角色权限被停用 检查用户角色是否包含受限角色op_restricted 400 AS.0022 request body error 请求体错误 检查请求体格式是否为标准的JSON格式,或者是否存在不支持的参数字段。 400 AS.0026 Scaling action is not allowed in the cooling duration. 冷却时间内不允许进行伸缩活动 请稍后重试 400 AS.0031 Policy doesn't allow [%s] to be performed. 细粒度鉴权失败,缺少指定的授权项 添加对应的授权项 404 AS.0033 The api version is illegal, only v1,v2. 查询指定版本API信息版本id非法 请输入正确版本id 400 AS.0034 Failed to execute the policy because the AS group is in active state. 伸缩组正在进行活动,策略无法触发 伸缩策略在伸缩组非活动状态才能被自动触发,请稍后重试 400 AS.0050 Scaling action failed. Max. instances reached. 伸缩组当前实例数与最大实例数相等,无法扩容 修改最大实例数 400 AS.1001 The value of parameter Start number is invalid. start number非法 请输入合法的start_number值 400 AS.1002 The value of parameter Limit is invalid. limit非法 请输入合法的limit值 400 AS.1003 The AS configuration ID is null. 伸缩配置ID为空 添加伸缩配置ID 400 AS.1004 The AS configuration does not exist. 伸缩配置不存在 使用正确的伸缩配置ID 400 AS.1006 The AS configuration is in use. 有伸缩组正在使用该伸缩配置,不能删除 为伸缩组更换伸缩配置后,再删除该伸缩配置。 400 AS.1007 The AS configuration name is null. 伸缩配置名称为空 添加伸缩配置名称 400 AS.1008 The AS configuration name is too long. 伸缩配置名称长度过长 使用正确的伸缩配置名称 400 AS.1009 The AS group ID is null. 伸缩组ID为空 添加伸缩组ID 400 AS.1011 The instance configuration information is null. instance_config字段为空 请确保instance_config字段不为空 400 AS.1014 The image ID in the AS configuration is null. 伸缩配置镜像ID为空 添加镜像ID 400 AS.1015 The image in the AS configuration does not exist. 伸缩配置镜像不存在 使用正确的镜像ID 400 AS.1016 The specification ID in the AS configuration cannot be null. 伸缩配置规格ID为空 添加规格ID 400 AS.1017 The specification [%s] in the AS configuration does not exist. 伸缩配置规格不存在 使用正确的规格ID 400 AS.1018 The specification [%s] and image is not match. 伸缩配置规格与镜像不匹配 请检查规格和镜像是否匹配,如果不匹配,请更换相关资源 400 AS.1019 The disk of this type is not applicable to the E CS . 伸缩配置规格与磁盘不匹配 请检查规格和磁盘类型是否匹配,如果不匹配,请更换相关资源 400 AS.1021 The image in the AS configuration is not active. 伸缩配置镜像未激活 使用正确的镜像ID 400 AS.1022 The image in the AS configuration is not available. 伸缩配置镜像不可用 使用正确的镜像ID 400 AS.1023 Invalid AS configuration name. 伸缩配置名称非法 使用正确的伸缩配置名称 400 AS.1024 The number of AS configurations exceeds the upper limit. 伸缩配置数量超过上限 删除不使用的伸缩配置或者申请扩大配额 400 AS.1025 The user login mode in the AS configuration is not unique. 伸缩配置用户登录方式不唯一 账户密码登录方式和密钥对登录方式互斥,且必选一个 400 AS.1026 The user login mode in the AS configuration is null. 伸缩配置用户登录方式为空 账户密码登录方式和密钥对登录方式互斥,且必选一个 400 AS.1027 The scaling config personality is invalid. 伸缩配置用户个人配置错误 请传入正确的personality值 400 AS.1028 The disk in the AS configuration is null. 伸缩配置磁盘为空 添加磁盘相关参数,确保disk字段不为空 400 AS.1029 The number of system disk in the AS configuration is invalid. 伸缩配置系统盘个数非法 系统盘有且只能有一个 400 AS.1030 The size of the system disk in the AS configuration is less than the specification required. 伸缩配置系统盘小于规格 系统盘请使用合适的size值 400 AS.1031 The size of the disk in the AS configuration is not correct. 伸缩配置磁盘大小不合法 请使用正确的size值 400 AS.1032 The ECS type [%s] in the AS configuration do not support 24 disks. 伸缩配置磁盘数量超过24个 请确保磁盘个数不超过限制 400 AS.1033 Parameter volumeType in the AS configuration is invalid. 伸缩配置磁盘volumeType非法 使用正确的volume_type值 400 AS.1034 Parameter diskType in the AS configuration is invalid. 伸缩配置diskType非法 使用正确的disk_type值 400 AS.1035 Parameter adminPass in the AS configuration is invalid. 伸缩配置密码复杂度不符合要求 使用复杂度符合要求的密码 400 AS.1036 32-bit operating system (OS) does not support the specification [%s] with 4G memory. 伸缩配置32位系统内存超过4G 请更换镜像或者规则 400 AS.1037 The flavorRef in the AS configuration is not available. 规格不可用,详细原因请查看错误详情 请更换规格 400 AS.1038 batch deleting scaling config failed 批量删除伸缩配置失败 出现该错误码时,可通过Message字段获取失败的伸缩配置ID和失败原因。 400 AS.1039 the number of scaling config is beyond the max limit 批量删除伸缩配置超过上限 允许批量删除的最大个数为50个 400 AS.1040 The list of AS config to be deleted is null. 伸缩配置列表为空 添加需要批量删除的伸缩配置ID 400 AS.1041 The eip info of scaling config is null. 伸缩配置public_ip字段中eip字段为空 当传入public_ip字段时,请确保eip字段不为空 400 AS.1042 The bandwidth size of eip is invalid. 伸缩配置带宽大小非法 使用正确的带宽值 400 AS.1043 The eip type of scaling config is invalid. 伸缩配置弹性IP类型非法 使用正确的弹性IP类型 400 AS.1044 The bandwidth charging mode of eip is invalid. 伸缩配置带宽计费模式非法 使用正确的带宽计费模式 400 AS.1045 The bandwidth type of eip is invalid. 伸缩配置带宽类型非法 使用正确的带宽类型 400 AS.1046 The bandwidth size of eip is null. 伸缩配置带宽大小为空 添加伸缩配置带宽的值 400 AS.1047 The bandwidth charging mode of eip is null. 伸缩配置带宽计费模式为空 添加带宽计费模式 400 AS.1048 The bandwidth id of eip is null. 伸缩配置共享带宽ID为空 添加共享带宽ID 400 AS.1049 Parameter userdata in the AS configuration is invalid. 伸缩配置userdata参数非法 使用正确的userdata值 400 AS.1050 The user login mode in the AS configuration is illegal. 伸缩配置用户登录方式非法 使用正确的登录方式 400 AS.1052 Parameter metadata in the AS configuration is invalid. 伸缩配置metadata参数非法 使用正确的metadata参数,metadata最大长度 512B,且key的值不能包含空白字符、$和. 400 AS.1053 The data image is not available. 伸缩配置数据镜像不可用 使用正确的数据镜像 400 AS.1054 The size of the data disk in the AS configuration is less than the data image required. 伸缩配置数据盘大小小于数据镜像所需要的 使用正确的数据盘大小 400 AS.1055 The system disk is not support to data image. 伸缩配置系统盘不支持导入数据镜像 参考错误码说明 400 AS.1056 The data image in the AS configuration does not exist. 伸缩配置数据镜像不存在 使用正确的数据镜像ID 400 AS.1057 The DSS of the disk in the AS configuration is not available. 伸缩配置专属存储不可用 使用正确的专属存储 400 AS.1058 The type of dss in the AS configuration is incorrect. 伸缩配置专属存储不支持该磁盘类型 更换专属存储或者磁盘类型 400 AS.1059 The capacity of dss in the AS configuration is not enough. 伸缩配置专属存储容量不足 更换专属存储 400 AS.1060 dss and evs is used together in the AS configuration. 伸缩配置不支持专属存储和云硬盘混用 参考错误码说明 400 AS.1061 the dss is not belong to the same az in the AS configuration. 伸缩配置专属存储不在同一个可用区下 更换专属存储使其在同一个可用区下 400 AS.1062 The number of EVS disks with snapshot IDs in the AS configuration is different from that of EVS disks specified in the full-ECS image. 伸缩配置中含快照ID的磁盘个数应当与整机镜像中的磁盘个数保持一致 参考错误码说明 400 AS.1063 The disk data backup in a full-ECS image cannot be used to restore the disk in DSS. 您选择的镜像为整机镜像,整机镜像中的磁盘备份不支持在专属存储中恢复磁盘 参考错误码说明 400 AS.1064 The data disk you have selected will be restored using the disk data backup in the full-ECS image. Then, data mirroring will be unavailable. 您选择的数据盘将从整机镜像中的磁盘备份恢复,此时无法再使用数据镜像 参考错误码说明 400 AS.1065 ECS resources specified in the AS configuration belong to different AZs. 伸缩配置中各类型虚拟机资源所属可用区不一致 请使用同一可用区下的虚拟机资源(如规格、镜像、磁盘等) 400 AS.1066 The AS configuration contains EVS disks with invalid snapshot IDs. 伸缩配置中含快照ID无效的磁盘 使用正确的快照ID 400 AS.1067 The value of parameter Offset number is invalid. offset参数非法 使用正确的offset值 400 AS.1068 The server group in the AS configuration does not exist. 伸缩配置中的云服务器组不存在 使用存在的云服务器组ID 400 AS.1069 The maximum number of ECSs has been reached for the ECS group. 云服务组内的服务器达到上限 更换其他的云服务器组ID 400 AS.1070 The bandwidth id of eip does not exist. 伸缩配置中的共享带宽不存在 使用正确的共享带宽ID 400 AS.1071 Parameter tenancy in the AS configuration is invalid. 伸缩配置中的tenancy参数非法 使用正确的tenancy值 400 AS.1072 The server group ID is invalid. 伸缩配置中的云服务器组ID非法 更换正确的云服务器组ID 400 AS.1073 The dedicated host id does not exist. 伸缩配置中的专属主机ID不存在 使用存在的专属主机ID 400 AS.1074 The value of parameter Marker is invalid. marker参数非法 使用正确的marker值 400 AS.1075 The image ID is invalid. 伸缩配置中的镜像ID非法 更换正确的镜像ID 400 AS.1076 The bandwidth id of eip is invalid. 伸缩配置中的共享带宽ID非法 更换正确的共享带宽ID 400 AS.1077 No available dedicated host resource. 无可用的专属主机资源 创建新的专属主机资源或者对已有专属主机资源进行排查恢复可用 400 AS.1078 The dedicated host has insufficient available capacity for [%s]. 您选择的专属主机的可用容量不足 创建新的专属主机资源或者使用其他专属主机 400 AS.1079 No dedicated host resources supporting this type [%s] of ECS. 无支持该类型云服务器的专属主机资源 更换伸缩配置中使用的云服务器类型 400 AS.1080 No dedicated host resources supporting the AZ [%s] you selected. 该可用区下无可用的专属主机资源 更换伸缩组的可用区或者在该可用区下创建专属主机 400 AS.1081 This specification [%s] does not support IPv6. 伸缩配置flavor不支持开启IPv6 更换伸缩配置 400 AS.1082 Bandwidth type is not shared. 使用的带宽的类型不是共享型 请使用带宽类型为共享型的带宽 400 AS.1083 Instance marketing type is illegal. 伸缩配置中的计费模式非法 请使用正确的market_type值 400 AS.1084 Failed to query the price of specification [%s] from CBC. 查询竞价或按需规格价格失败 请更换伸缩配置规格或联系技术支持 400 AS.1085 Invalid multi flavor priority policy. 伸缩配置中的多规格使用优先级策略类型非法 请使用正确的multi_flavor_priority_policy值 400 AS.1086 AS configuration is not available for AS group 伸缩配置不可用 为伸缩组更换伸缩配置 400 AS.1087 The number of flavors in the AS config exceeds the upper limit. 伸缩配置中规格数量达到限制 确保伸缩配置中的规格个数不超过限制 400 AS.1088 The image in the AS configuration you selected is unavailable for the AZ [%s] in AS group 伸缩配置中的镜像在伸缩组的可用区中不可用 为伸缩组更换伸缩配置或者更换伸缩组的可用区 400 AS.1090 The specification [s%] in the AS configuration cannot match image architecture 所选规格与镜像的架构类型不一致 请确保选择的规格和镜像架构类型一致 400 AS.1097 Parameter iops in the AS configuration is invalid 伸缩配置中iops参数不合法 请传入合法的iops参数 400 AS.1098 Parameter throughput in the AS configuration is invalid 伸缩配置中throughput参数不合法 请传入合法的throughput参数 400 AS.1099 Can not create AS configuration with exist instance that volume_type is GPSSD2,ESSD2 使用已有云服务器为模板创建伸缩配置时,磁盘类型不允许为GPSSD2和ESSD2 使用其他磁盘类型的虚拟机为模板创建伸缩配置 400 AS.2002 The name of the AS group is null. 伸缩组名称不能为空 添加伸缩组名称 400 AS.2003 The AS group name is too long. 伸缩组名称过长 使用正确的伸缩组名称 400 AS.2004 Invalid min or max number of instances in the AS group. 伸缩组最大/最小实例数值非法 请传入正确的伸缩组最大/最小实例数值 400 AS.2005 The expected number cannot be less than the minimum number of instances or greater than the maximum number of instances. 伸缩组期望实例数不合法 请传入合法的伸缩组期望实例数 400 AS.2006 Invalid cooling duration of the AS group. 伸缩组冷却时间不合法 请传入合法的伸缩组冷却时间 400 AS.2007 The AS group does not exist. 伸缩组不存在 使用正确的伸缩组ID 400 AS.2008 Invalid execution action of the AS group. 伸缩组执行动作不合法 使用正确的伸缩组执行动作 400 AS.2009 The AS group ID is null. 伸缩组ID为空 添加伸缩组ID 400 AS.2010 The expected number of instances in the AS group can not be smaller than the number of instances which set instance protection. 伸缩组期望实例数不能小于设置实例保护的实例数 请确保期望实例数不小于设置实例保护的实例数,或者对实例取消实例保护后再修改期望实例数 400 AS.2011 Invalid AZ in AS group. 伸缩组中的可用区非法 使用正确的参数值 400 AS.2012 The VPC of the AS group does not exist. 伸缩组中的VPC不存在 使用正确的参数值 400 AS.2013 Parameter networks in the AS group is invalid. 伸缩组中的networks参数非法 使用正确的参数值 400 AS.2014 The security group of the AS group does not exist. 伸缩组中的安全组不存在 使用正确的参数值 400 AS.2015 Parameter listenerId in the AS group is invalid. 伸缩组弹性负载均衡监听器非法 使用正确的参数值 400 AS.2016 The listener of the AS group does not belong to the vpc. 伸缩组中负载均衡监听器所属VPC与伸缩组中的VPC不一致 更换VPC ID或者更换监听器ID 400 AS.2017 The ID of the VPC in the AS group is null. 伸缩组中的VPC为空 添加VPC ID 400 AS.2018 No AS configuration is in the AS group. 伸缩组没有伸缩配置信息,启用失败 为伸缩组添加伸缩配置后,重新启用伸缩组 400 AS.2019 The value of the parameter that specifies whether to forcibly delete the group is invalid. 是否强制删除伸缩组的值非法 使用正确的参数值 400 AS.2020 The scaling group status is illegal. 伸缩组状态非法 伸缩组当前状态不能进行操作 400 AS.2021 The current number of instances in the AS group is not 0. 伸缩组当前实例数不为0,删除失败 请先将伸缩组中实例删除,再删除伸缩组 400 AS.2022 The AS group name contains invalid characters. 伸缩组名称含非法字符 使用正确的伸缩组名称 400 AS.2023 The number of AS groups exceeds the upper limit. 伸缩组数量超过上限 删除不使用的伸缩组或者申请扩大配额 400 AS.2024 The number of subnets in the AS group exceeds the upper limit. 伸缩组子网超过上限 确保子网个数不超过上限 400 AS.2025 The number of security groups in the AS group exceeds the upper limit. 伸缩组安全组达到上限 确保安全组个数不超过上限 400 AS.2026 The type of listeners in the AS group is not unique. 伸缩组负载均衡监听器种类不唯一 lb_listener_id和lbaas_listeners字段互斥 400 AS.2027 The subnet of the AS group does not belong to the vpc. 伸缩组的某些子网所在VPC与伸缩组中的VPC不一致 更换VPC ID或者子网ID 400 AS.2028 The modified expected number of instances is the same as the original number. 伸缩组期望实例数修改后与之前相同 参考错误码说明 400 AS.2029 Invalid health check method of the AS group. 伸缩组实例健康检查方式错误 使用正确的health_periodic_audit_method值 400 AS.2030 You are not allowed to modify the AZ, subnet, and security information when the number of instances in the AS group is not 0, the AS group is scaling, or the AS group is in Inservice status. 伸缩组实例数不为0、处于伸缩活动中或者伸缩组为Inservice状态,不允许修改可用区、子网、安全组信息。 请确认伸缩组内实例数,伸缩组状态或稍后再试 400 AS.2031 Invalid health check period of the AS group. 伸缩组健康检查周期不合法 使用正确的health_periodic_audit_time值 400 AS.2032 Invalid instance removal policy. 伸缩组实例移除策略不合法 使用正确的instance_terminate_policy值 400 AS.2033 You are not allowed to perform the operation when the AS group is in current [%s] status. 伸缩组当前状态不能进行操作 参考错误码说明 400 AS.2034 Invalid notification method of the AS group. 伸缩组通知方式不合法 使用正确的通知方式 400 AS.2035 The number of instances manually added to the AS group exceeds the maximum number of the instances required in the AS group. 手动添加一些云服务器后,伸缩组中云服务器数量超过伸缩组最大实例数 请添加合适数量云服务器或增大伸缩组最大实例数 400 AS.2036 The number of instances manually deleted is less than the minimum number of the instances required in the AS group. 手动删除一些云服务器后,伸缩组中云服务器数量小于伸缩组最小实例数 请删除合适数量云服务器或减小伸缩组最小实例数 400 AS.2037 The number of listeners in the AS group exceeds the upper limit. 伸缩组负载均衡监听器达到上限 请选择合适数量负载均衡监听器 400 AS.2038 The type [%s] of ECS in the AZ you selected has been sold out. 伸缩组的可用区下的该类型云服务器资源已售罄 参考错误码说明,修改伸缩组的可用区信息,或者为伸缩组更换伸缩配置 400 AS.2039 Parameter protocolPort in the AS group is invalid. 伸缩组统一负载均衡protocolPort非法 配置正确的protocolPort参数 400 AS.2040 Parameter weight in the AS group is invalid. 伸缩组统一负载均衡weight非法 配置正确的weight参数 400 AS.2042 Parameter pool of lbaas in the AS group is invalid. 伸缩组统一负载均衡pool非法 配置正确的pool参数 400 AS.2043 There is not avalid volume in the AZ [%s] you selected. 伸缩组的可用区下该类型存储资源已售罄或者不存在 参考错误码说明,修改伸缩组的可用区信息,或者为伸缩组更换伸缩配置 400 AS.2044 The AZ in the AS group is not available. 伸缩组的AZ不可用 参考错误码说明,修改伸缩组的可用区信息 400 AS.2045 The min or max number of instances in the AS group exceeds the upper limit. 伸缩组的最小实例数或最大实例数超出限制 请传入合适大小的伸缩组最大实例数和最小实例数 400 AS.2046 Invalid health check grace period of the AS group. 伸缩组实例健康状况检查宽限期不合法 请使用正确的health_periodic_audit_grace_period值 400 AS.2047 The AS group is in active status. 伸缩组处于活动状态无法修改lb参数 等待伸缩组活动结束后再执行修改lb操作 400 AS.2048 This subnet does not support IPv6. 伸缩组子网不支持开启IPv6 更换支持IPv6的子网或者不启用IPv6 400 AS.2049 The AZ in the AS group does not support IPv6. 伸缩组AZ不支持开启IPv6 更换支持IPv6的AZ或者不启用IPv6 400 AS.2050 IPv6 shared bandwidth can be used only after IPv6 is enabled. IPv6启用后才可以使用IPv6共享带宽 请启用IPv6后再使用IPv6带宽 400 AS.2051 The expected number cannot be less than the number of instances moved into the standby state. 伸缩组期望实例数不能小于备用实例个数 确保修改后的伸缩组期望实例数不小于备用实例(含正在进入备用状态和已备用状态的实例)个数 400 AS.2052 The expected number cannot be less than the sum of the number of standby instances and protected instances. 伸缩组期望实例数不能小于备用实例和保护实例个数之和 确保修改后的伸缩组期望实例数不小于备用实例(含正在进入备用状态和已备用状态的实例)和设置实例保护的实例个数之和 400 AS.2053 Invalid multi az priority policy. 伸缩组多AZ优先级策略类型不合法 请更换伸缩组多AZ优先级策略类型 400 AS.2054 The AS group is in active status. 伸缩组处于活动状态,无法修改AZ 等待伸缩组活动结束后再执行修改AZ操作 400 AS.3002 Invalid AS policy type. 伸缩策略类型非法 使用正确的scaling_policy_type值 400 AS.3003 The information about the AS policy is null. 伸缩策略类型为定时或周期时,scheduled_policy相关信息为空 添加scheduled_policy参数 400 AS.3004 Invalid recurrence type in the AS policy. 周期表达式类型错误 使用正确的recurrence_type值 400 AS.3005 The end time of the scaling action triggered periodically is null. 周期策略结束时间为空 添加end_time参数 400 AS.3006 The format of the end time of the scaling action triggered periodically is incorrect. 周期策略结束时间格式错误 使用正确的结束时间格式 400 AS.3007 The end time of the scaling action triggered periodically must be later than the current time. 周期策略结束时间必须晚于当前时间 请确保结束时间晚于当前时间 400 AS.3008 Parameter lanchTime in the AS policy is null. 触发时间为空 添加launch_time参数 400 AS.3009 The format of parameter lanchTime is incorrect. 策略触发时间格式错误 使用正确的策略触发时间格式 400 AS.3010 The triggering time of the scheduled policy must be later than the current time. 定时策略触发时间必须晚于当前时间 请确保定时策略触发时间晚于当前时间 400 AS.3011 The AS policy type is null. 伸缩策略类型为空 添加scaling_policy_type参数 400 AS.3012 Invalid cooling duration in the AS policy. 伸缩策略冷却时间不合法 使用正确的cool_down_time值 400 AS.3013 The AS policy name is null. 伸缩策略名称为空 添加scaling_policy_name参数 400 AS.3014 The length of the AS policy name is invalid. 伸缩策略名称长度不合法 使用正确的scaling_policy_name值 400 AS.3015 The action in the AS policy is null. 伸缩策略执行动作为空 添加scaling_policy_action参数 400 AS.3016 The operation to perform the action in the AS policy is null. 伸缩策略执行动作的操作为空 添加operation参数 400 AS.3017 The operation to perform the action in the AS policy action is invalid. 伸缩策略动作的操作不合法 使用正确的operation值 400 AS.3018 The number of instances which action in the AS policy operates on is invalid. 伸缩策略操作的实例数不合法 使用正确的instance_number值 400 AS.3019 The AS group ID in the AS policy cannot be null. 伸缩策略中伸缩组ID为空 添加伸缩组ID 400 AS.3020 The AS policy does not exist. 伸缩策略不存在 使用正确的伸缩策略ID 400 AS.3021 The AS policy ID cannot be null. 伸缩策略ID为空 添加伸缩策略ID 400 AS.3022 The action of the AS policy request body is invalid. 伸缩策略请求体action非法 使用正确的action值 400 AS.3023 The period type of the AS policy is null. 伸缩策略周期类型为空 添加recurrence_type参数 400 AS.3024 The value of the period type of the AS policy is null. 伸缩策略周期触发任务数值为空 添加recurrence_value参数 400 AS.3025 The value of period type of the AS policy is invalid. 伸缩策略周期类型非法 使用正确的recurrence_type值 400 AS.3026 The alarm ID in the AS policy is null. 伸缩策略告警ID为空 添加告警ID 400 AS.3027 The AS policy must be in the inservice status when the AS policy is performed. 伸缩策略执行时,伸缩组状态必须为启用状态 启用伸缩组后再试 400 AS.3028 The format of the start time for the scaling action triggered periodically is incorrect. 周期策略起始时间格式错误 使用正确的起始时间格式 400 AS.3029 The start time of the scaling action triggered periodically must be earlier than the end time. 周期策略起始时间必须早于结束时间 请确保周期策略起始时间早于结束时间 400 AS.3030 The alarm in the AS policy does not exist. 伸缩策略告警规则不存在 修改伸缩策略使用的告警规则 400 AS.3031 Invalid AS policy name. 伸缩策略名称非法 使用正确的scaling_policy_name值 400 AS.3032 The number of AS policies exceeds the upper limit. 伸缩策略数量达到限制 删除不使用的伸缩策略或者申请扩大配额 400 AS.3033 The triggering time of the periodic policy is not included in the effective time of the policy. 周期策略的触发时间不包含在策略的生效时间内 请确保周期策略的触发时间包含在策略的起始时间到结束时间的范围内 400 AS.3034 The alarm ID in the AS policy is being used by another AS group. 伸缩策略告警ID正在被其它伸缩组使用 参考错误码说明,告警ID同一时间只能被一个伸缩组的伸缩策略使用 400 AS.3035 The percentage of instances which action in the AS policy operates on is invalid. 伸缩策略操作的实例百分比非法 使用正确的instance_percentage值 400 AS.3036 The action in the AS policy operates is not unique. 伸缩策略操作实例的方式不唯一 instance_percentage和instance_number互斥 400 AS.3037 The scaling resource type in the AS policy is invalid. 伸缩策略资源类型非法 使用正确的scaling_resource_type值 400 AS.3038 The AS policy is in execting status. 伸缩策略正在执行中无法再次执行 请稍后再试 400 AS.3040 The adjustment by policy reached the limit 伸缩策略中的伸缩资源已达到修改上限 参考错误码说明 400 AS.3041 The scaling resource ID in the AS policy is null. 伸缩策略中的伸缩资源ID为空 请在伸缩策略中传入有效的伸缩资源ID 400 AS.3042 The scaling resource in the AS policy does not exist. 伸缩策略中的伸缩资源不存在 请在伸缩策略中传入有效的伸缩资源ID 400 AS.3043 The limit which action in the AS policy operates on is invalid. 伸缩策略中的limits参数值非法 请在伸缩策略中使用合法limits值 400 AS.3044 Failed to adjust the bandwidth of EIP because the EIP is charged by month or year. 包年包月带宽不支持动态调整 请选择合法的带宽伸缩资源 400 AS.3045 Failed to delete policies in a batch. 批量删除策略失败 出现该错误码时,可通过Message字段获取失败的策略ID和失败原因。 400 AS.3046 Failed to resume policies in a batch. 批量启用策略失败 出现该错误码时,可通过Message字段获取失败的策略ID和失败原因。 400 AS.3047 Failed to pause policies in a batch. 批量停用策略失败 出现该错误码时,可通过Message字段获取失败的策略ID和失败原因。 400 AS.3048 The value of the parameter that specifies whether to forcibly delete the policy is invalid. 是否强制删除策略的值非法 使用正确的force_delete值 400 AS.3049 The list of AS policies to be batched is empty. 待批量操作的伸缩策略列表信息为空 添加需要批量操作的伸缩策略ID 400 AS.3050 The alarm ID in the AS policy is illegal. 伸缩策略中的告警ID格式错误 使用格式正确的告警ID 400 AS.3054 The scaling resource type in the AS policy is null. 伸缩策略中伸缩资源类型为空 添加scaling_resource_type参数 400 AS.3055 The scaling resource ID in the AS policy is format wrong. 伸缩策略中的伸缩资源ID非法 请在伸缩策略中传入有效的伸缩资源ID 400 AS.3056 The value of the parameter that specifies whether to delete the alarm in the AS policy is invalid. 是否删除伸缩策略使用的告警规则的值非法 请使用合法的delete_alarm值 400 AS.3057 The value of parameter sort_by in the request is invalid. 请求参数中sort_by值非法 请使用合法的sort_by值 400 AS.3058 The value of parameter order in the request is invalid. 请求参数中order值非法 请使用合法的order值 400 AS.4000 The value of parameter start_number in the request for the instance is invalid. 伸缩实例请求参数中start_number值非法 请使用合法的start_number值 400 AS.4001 The value of parameter limit in the request for the instance is invalid. 伸缩实例请求参数中limit值非法 请使用合法的limit值 400 AS.4003 The value of parameter life_cycle_state in the instance request is invalid. 伸缩实例请求参数中life_cycle_state值非法 使用正确的life_cycle_state值 400 AS.4004 The value of parameter health_status in the request for the instance is invalid. 伸缩实例请求参数中health_status值非法 使用正确的health_status值 400 AS.4005 Parameter scaling_group_id in the request for the instance does not exist. 伸缩实例请求参数中scaling_group_id不存在 使用正确的scaling_group_id 400 AS.4006 The instance does not exist. 伸缩实例不存在 使用正确的实例ID 400 AS.4007 The value of the parameter that specifies whether to delete the instance is invalid. 是否删除虚拟机的值非法 使用正确的参数值 400 AS.4008 The start time format of the log about the expected number of the instances is incorrect. 期望日志起始时间格式错误 使用正确的参数值 400 AS.4009 The the end time format of the log about expected number of the instances is incorrect. 期望日志结束时间格式错误 使用正确的参数值 400 AS.4010 Parameter start_number in the request for the log about the expected number of instances is invalid. 期望日志请求参数start_number非法 使用正确的参数值 400 AS.4011 The value of parameter limit in the request for the log about the expected number of instances is invalid. 期望日志请求参数中limit值非法 使用正确的参数值 400 AS.4012 The value of parameter logId in the request for the log about the expected number of instances is invalid. 期望日志请求参数中logId值非法 使用正确的参数值 400 AS.4013 The list of instances to be deleted is null. 待删除伸缩实例列表信息为空 添加待删除的伸缩实例信息 400 AS.4014 The instances do not belong to the same AS group. 实例不属于同一个组 选择同一伸缩组内的实例 400 AS.4015 The instance is not in the inservice status. 伸缩实例不是inservice状态 选择inservice状态的实例 400 AS.4016 Failed to delete the instance because the instance is charged by month or year. 伸缩实例是包年包月虚拟机,不能被直接删除 参考错误码说明 400 AS.4017 The requested instance is null. 伸缩实例查询为空 传入有效伸缩实例 400 AS.4018 The action of the body in the request to operate the instance is invalid. 批量操作实例请求体action参数值不合法 使用正确的参数值 400 AS.4019 The list of instances to be added to the AS group is null. 待添加伸缩实例列表信息为空 传入有效的伸缩实例 400 AS.4020 The AZ to which the instance belongs is not within the AZ in the AS group. 实例所属AZ不在伸缩组的AZ中 选择AZ合适的实例 400 AS.4021 The VPC to which the instance belongs is different from the VPC in the AS group. 实例所属VPC与伸缩组VPC不同 选择VPC合适的实例 400 AS.4022 The number of instances added to the AS group exceeds the upper limit. 添加实例个数超出限制 添加合适数量的实例 400 AS.4023 The added instance has already existed. 添加的实例已经存在 请选择其他有效实例 400 AS.4024 The instance is not in the active status. 添加的实例为非active状态 请选择active状态实例 400 AS.4025 The value of the parameter that specifies whether to append new instance(s) is invalid. 将实例移入备用状态时,是否补充新的云服务器的值非法 使用正确的参数值 400 AS.4026 The number of instances deleted exceeds the upper limit. 删除实例个数超出限制 删除合适数量实例 400 AS.4027 The added instance has already existed in other AS group. 添加的实例已经被加入到其它伸缩组中 请选择其他有效实例 400 AS.4028 The AS instance ID cannot be null. 实例ID不能为空 使用正确的实例ID 400 AS.4029 Failed to add instances in a batch. 批量添加云服务器失败。 出现该错误码时,可通过Message字段获取失败的云服务器ID和失败原因。 400 AS.4030 Failed to delete instances in a batch. 批量删除云服务器失败。 出现该错误码时,可通过Message字段获取失败的云服务器ID和失败原因。 400 AS.4032 The list of instances is null. 伸缩实例列表信息为空 参考错误码说明 400 AS.4033 Failed to set instance protection in a batch. 批量更新实例的实例保护属性失败。 出现该错误码时,可通过Message字段获取失败的云服务器ID和失败原因。 400 AS.4036 Failed to set instance enter standby in a batch. 批量将实例转入备用状态失败。 出现该错误码时,可通过Message字段获取失败的云服务器ID和失败原因。 400 AS.4037 Failed to set instance exit standby in a batch. 批量将实例移出备用状态失败。 出现该错误码时,可通过Message字段获取失败的云服务器ID和失败原因。 400 AS.4038 The instance is not in the standby status. 伸缩实例不是备用状态 请选择备用状态的实例 400 AS.4039 After adding new instances equal to the number of standby instances, the expected number cannot be larger than the max instance number of group. 加入与备用实例等量的新实例后,期望实例数不能大于伸缩组的最大实例数 修改伸缩组的最大实例数 400 AS.4043 The number of instances exceeds the upper limit. 批量操作实例个数超出限制 单次最多批量操作实例个数为10 400 AS.7003 called interface of VPC service failed 调用VPC服务的接口异常 请稍后再试或联系技术支持人员 400 AS.7011 This DeC does not support ECSs of this type [%s]. DeC不支持该类型云服务器 使用其他类型云服务器规格 400 AS.7012 lblistener does not exist. 弹性负载均衡监听器不存在 修改伸缩组的监听器信息 400 AS.7016 This DeC does not support the AZ [%s] you selected. DeC不支持该AZ 修改伸缩组的可用区信息 400 AS.7019 The number of private IP addresses in the subnet is insufficient. 子网下私有ip不足 修改伸缩组的子网信息,之后重新启用伸缩组 400 AS.7022 Keypair does not exist. 伸缩配置SSH密钥不存在 为伸缩组更换伸缩配置 400 AS.7025 The topic urn is not valid. 通知主题不合法 使用正确的通知主题 400 AS.7026 The topic scene is not valid. 通知场景不合法 使用正确的通知场景 400 AS.7027 The topic of notification is null. 通知主题不能为空 添加通知主题 400 AS.7028 The number of topics in the AS group exceeds the upper limit. 通知个数超过限制 最多允许添加5个 400 AS.7029 The topic of notification is duplicate. 通知主题重复 使用正确的通知主题 400 AS.7030 Invalid lifecycle hook default timeout. 生命周期挂钩超时时间不合法 使用正确的参数值 400 AS.7031 Invalid lifecycle hook name. 生命周期挂钩名称不合法 使用正确的参数值 400 AS.7032 The name of the lifecycle hook is empty. 生命周期挂钩名称不能为空 添加生命周期挂钩名称 400 AS.7033 Invalid lifecycle hook type. 生命周期挂钩类型不合法 使用正确的参数值 400 AS.7034 Invalid lifecycle hook callback action result. 生命周期挂钩操作不合法 使用正确的参数值 400 AS.7035 The metadata of the lifecycle hook is too long. 生命周期挂钩metadata过长 使用正确的参数值 400 AS.7036 The lifecycle hook is null. 生命周期挂钩不能为空 使用正确的参数值 400 AS.7037 The type of the lifecycle hook is empty. 生命周期挂钩类型不能为空 使用正确的参数值 400 AS.7038 The number of hooks in the AS group exceeds the upper limit. 生命周期挂钩个数超过限制 最多允许添加5个 400 AS.7039 The lifecycle hook callback action result is empty. 生命周期挂钩回调操作不能为空 使用正确的参数值 400 AS.7040 The lifecycle hook callback object is empty. 生命周期挂钩回调对象不能为空 使用正确的参数值 400 AS.7041 The lifecycle hook callback object is empty. 生命周期挂钩名称重复 使用正确的参数值 400 AS.7042 The lifecycle hook callback object does not exist. 生命周期挂钩回调对象不存在 使用正确的参数值。 400 AS.7043 The lifecycle hook topic urn does not exist. 生命周期挂钩使用的通知主题不存在 使用正确的参数值,检查生命周期挂钩使用的通知主题。 400 AS.7044 The tag of this resource is null 标签为空 使用正确的参数值。 400 AS.7045 The number of tags exceeded. 标签个数超过限制 最多允许添加10个。 400 AS.7046 The tags in the resource is invalid. tag非法 请使用正确的参数值 400 AS.7047 The value of tag in the resource is too long. 标签的value过长 使用正确的参数值。 400 AS.7048 The resource type in this operation with tag is invalid. 标签资源类型不合法 使用正确的参数值。 400 AS.7049 The action in this operation with tag is invalid. 标签执行动作不合法 使用正确的参数值。 400 AS.7050 The key of tag cannot be duplicate. 标签的key重复 使用正确的参数值。 400 AS.7051 The backend ECS group in the AS group does not exist. 伸缩组中的后端云服务器组不存在 使用正确的参数值,更换负载均衡的pool。 400 AS.7052 The matches in the resource is invalid. matches非法 请使用合法的matches值。 400 AS.7054 The value of tag cannot be duplicate. tag中一个key下value重复 对tag下对应的value进行检查,避免重复。 400 AS.7055 The metadata of the lifecycle hook has special character. 生命周期挂钩metadata包含非法字符 使用正确的参数值。 400 AS.7059 The enterprise project does not exist. 企业项目不存在 请使用存在的企业项目 400 AS.7060 The enterprise project is unavailable. 企业项目不可用 请使用可用的企业项目 400 AS.7061 The value of scaling tag is null. 标签的value为空 使用正确的参数值。 400 AS.7062 The key of scaling tag is null. 标签的key为空 使用正确的参数值。 400 AS.7063 The key of scaling tag is too long. 标签的key过长 使用正确的参数值。 400 AS.7065 The value of parameter enterprise_project_id in the request is invalid. 请求参数enterprise_project_id非法 使用合法的enterprise_project_id。 400 AS.7078 Failed to get the security group. Try again later or contact customer service. 调用VPC服务的接口,获取安全组异常 稍后重试或者联系技术支持人员 400 AS.7079 Failed to get the image. Try again later or contact customer service. 查询镜像接口,IMS响应异常 稍后重试或者联系技术支持人员 400 AS.7081 The enterprise project is disabled and cannot be bound to resources. 企业项目不可用,不能绑定资源 检查企业项目是否为启用状态 400 AS.7100 The tag policy does not allow the specified value for the following tag key: %s. 标签不允许为以下键指定值:%s。 修正对应的tag信息或联系技术支持。 400 AS.7111 Insufficient instance quota. 云服务器配额不足 释放不使用的云服务器资源或者申请扩大云服务器配额。 400 AS.7112 Insufficient volume quota. 云硬盘配额不足 释放不使用的云服务器资源或者申请扩大卷配额。 400 AS.7113 Insufficient elastic ip quota. 弹性IP配额不足 释放不使用的弹性IP或者申请扩大弹性IP配额。 400 AS.7114 Insufficient ram quota. 云服务器内存配额不足 释放不使用的云服务器资源或者申请扩大云服务器内存配额。 400 AS.7115 Insufficient cpu quota. 云服务器CPU配额不足 释放不使用的云服务器资源或者申请扩大云服务器CPU配额 400 AS.7118 The maximum number of EIPs bounded to this shared bandwidth has been reached. 共享带宽绑定的EIP个数超过最大限制 更换共享带宽 400 AS.8004 User resources are frozen. 用户资源被冻结,无法进行操作 需要充值,非欠费状态自动解冻 400 AS.9001 The format of the start time of the scaling activity log is incorrect. 伸缩活动日志起始时间格式错误 使用正确的参数值 400 AS.9002 The format of the end time of the scaling activity log is incorrect. 伸缩活动日志结束时间格式错误 使用正确的参数值 400 AS.9003 The value of parameter start_number in the request for the scaling activity log is invalid. 伸缩活动日志请求参数start_number非法 使用正确的参数值 400 AS.9004 The value of parameter limit in the request for the scaling activity log is invalid. 伸缩活动日志请求参数中limit值非法 使用正确的参数值。 400 AS.9005 The value of parameter log_id in the request for the scaling log is invalid. 伸缩活动日志请求参数中logId值非法 使用正确的参数值 400 AS.9007 The format of the execute time in the request is incorrect. 策略执行日志时间格式错误 使用正确的参数值 400 AS.9008 The value of parameter start_number in the request is invalid. 策略执行日志请求参数start_number非法 使用正确的参数值 400 AS.9009 The value of parameter limit in the request is invalid. 策略执行日志请求参数中limit值非法 使用正确的参数值 400 AS.9010 The value of parameter log_id in the request is invalid. 策略执行日志请求参数中logId值非法 使用正确的参数值 400 AS.9011 The value of parameter scaling_resource_id in the request is invalid. 策略执行日志请求参数中资源Id值非法 使用正确的参数值 400 AS.9012 The value of parameter type in the request for the scaling activity log is invalid. 伸缩活动日志请求参数中type值非法 使用正确的参数值 400 AS.9013 The value of parameter status in the request for the scaling activity log is invalid. 伸缩活动日志请求参数中status值非法 使用正确的参数值
  • 弹性伸缩实例 权限 对应API接口 授权项 IAM项目 (Project) 企业项目 (Enterprise Project) 查询弹性伸缩组中的实例列表 GET /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/list as:instances:list √ √ 移出弹性伸缩组实例 DELETE /autoscaling-api/v1/{project_id}/scaling_group_instance/{instance_id} as:instances:delete √ √ 批量操作实例 POST /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/action as:instances:batchAction √ √ 父主题: 权限和授权项
  • 响应参数 表2 响应参数 参数 参数类型 描述 total_number Integer 总记录数 start_number Integer 查询的起始行号 limit Integer 查询记录数 scaling_activity_log Array of scaling_activity_log objects 伸缩活动日志列表。详情请见表 scaling_activity_log字段数据结构说明。 表3 scaling_activity_log字段数据结构说明 参数 参数类型 描述 status String 伸缩活动状态: SUC CES S:成功 FAIL:失败 DOING:伸缩过程中 start_time String 伸缩活动触发时间,遵循UTC时间。 end_time String 伸缩活动结束时间,遵循UTC时间。 id String 伸缩活动日志ID instance_removed_list Array of scaling_instance objects 完成伸缩活动且只被移出弹性伸缩组的云服务器名称列表。详情请见表 scaling_instance字段数据结构说明。 instance_deleted_list Array of scaling_instance objects 完成伸缩活动且被移出弹性伸缩组并删除的云服务器名称列表。详情请见表 scaling_instance字段数据结构说明。 instance_added_list Array of scaling_instance objects 完成伸缩活动且被加入弹性伸缩组的云服务器名称列表。详情请见表 scaling_instance字段数据结构说明。 instance_failed_list Array of scaling_instance objects 弹性伸缩组中伸缩活动失败的云服务器列表。详情请见表 scaling_instance字段数据结构说明。 instance_standby_list Array of scaling_instance objects 完成伸缩活动且被转入/移出备用状态的云服务器列表。详情请见表 scaling_instance字段数据结构说明。 scaling_value Integer 伸缩活动中变化(增加或减少)的云服务器数量。 description String 伸缩活动的描述信息 instance_value Integer 伸缩组当前实例数值 desire_value Integer 伸缩活动最终期望实例数值 lb_bind_success_list Array of modify_lb objects 绑定成功的负载均衡器列表。详情请见表 modify_lb字段数据结构说明。 lb_bind_failed_list Array of modify_lb objects 绑定失败的负载均衡器列表。详情请见表 modify_lb字段数据结构说明。 lb_unbind_success_list Array of modify_lb objects 解绑成功的负载均衡器列表。详情请见表 modify_lb字段数据结构说明。 lb_unbind_failed_list Array of modify_lb objects 解绑失败的负载均衡器列表。详情请见表 modify_lb字段数据结构说明。 type String 伸缩组活动类型 表4 scaling_instance字段数据结构说明 参数 参数类型 描述 instance_name String 云服务器名称 instance_id String 云服务器id failed_reason String 实例伸缩失败原因 failed_details String 实例伸缩失败详情 instance_config String 实例配置信息 表5 modify_lb字段数据结构说明 参数 参数类型 描述 lbaas_listener lbaas_listener object 增强型负载均衡器信息。详情请见表 lbaas_listener字段数据结构说明。 listener String 经典型负载均衡器信息 failed_reason String 负载均衡器迁移失败原因 failed_details String 负载均衡器迁移失败详情 表6 lbaas_listener字段数据结构说明 参数 参数类型 描述 listener_id String 监听器ID pool_id String 后端云服务器组ID protocol_port Integer 后端协议端口,指后端云服务器监听的端口 weight Integer 权重,指后端云服务器分发得到请求的数量比例
  • 响应示例 { "limit": 20, "scaling_activity_log": [ { "id": "8753a18c-931d-4cb8-8d49-6c99396af348", "instance_value": 0, "desire_value": 0, "scaling_value": 0, "start_time": "2018-11-22T13:46:20Z", "end_time": "2018-11-22T13:47:38Z", "status": "SUCCESS", "lb_bind_success_list": [ { "lbaas_listener": { "weight": 1, "listener_id": null, "pool_id": "0f0a9dd8-2e1d-4432-8ca2-49adc75aa662", "protocol_port": 82 } } ], "lb_bind_failed_list": [], "lb_unbind_success_list": [], "lb_unbind_failed_list": [], "type": "MODIFY_ELB" }, { "id": "44152cf2-a005-4507-b6e9-66a2a64eff52", "instance_value": 0, "desire_value": 1, "scaling_value": 1, "start_time": "2018-11-22T13:44:22Z", "end_time": "2018-11-22T13:46:02Z", "instance_added_list": [ { "instance_id": "8e273bac-d303-46dc-9883-628be2294bdf", "instance_name": "as-config-t66a_9W8L9SSK" } ], "instance_deleted_list": [], "instance_removed_list": [], "instance_failed_list": [], "status": "SUCCESS", "description": "{\"reason\":[{\"change_reason\":\"MANNUAL\",\"old_value\":0,\"change_time\":\"2018-11-22T13:44:19Z\",\"new_value\":1}]}", "type": "NORMAL" }], "total_number": 2, "start_number": 0}
  • 返回值 正常 200 异常 返回值 说明 400 Bad Request 服务器未能处理请求。 401 Unauthorized 被请求的页面需要用户名和密码。 403 Forbidden 对被请求的页面访问禁止。 404 Not Found 服务器无法找到被请求的页面。 405 Method Not Allowed 请求中指定的方法不被允许。 406 Not Acceptable 服务器生成的响应无法被客户端所接受。 407 Proxy Authentication Required 用户必须首先使用代理服务器进行验证,这样请求才会被处理。 408 Request Timeout 请求超出了服务器的等待时间。 409 Conflict 由于冲突,请求无法被完成。 500 Internal Server Error 请求未完成。服务异常。 501 Not Implemented 请求未完成。服务器不支持所请求的功能。 502 Bad Gateway 请求未完成。服务器从上游服务器收到一个无效的响应。 503 Service Unavailable 请求未完成。系统暂时异常。 504 Gateway Timeout 网关超时。
  • 请求示例 查询ID为e5d27f5c-dd76-4a61-b4bc-a67c5686719a的伸缩组的伸缩活动日志,查询的起始时间为2018-11-22T00:00:00Z,结束时间为2018-11-22T14:00:00Z。 GET https://{Endpoint}/autoscaling-api/v2/{project_id}/scaling_activity_log/e5d27f5c-dd76-4a61-b4bc-a67c5686719a?start_time=2018-11-22T00:00:00Z&end_time=2018-11-22T14:00:00Z
  • URI GET /autoscaling-api/v2/{project_id}/scaling_activity_log/{scaling_group_id} 可以在URI后面用‘?’和‘&’添加不同的查询条件组合。支持参数说明中所有非必选参数过滤,请参考请求示例。 表1 参数说明 参数 是否必选 参数类型 描述 project_id 是 String 项目ID scaling_group_id 是 String 伸缩组ID log_id 否 String 伸缩活动日志ID start_time 否 String 查询的起始时间,遵循UTC时间,格式是“yyyy-MM-ddThh:mm:ssZ”。 end_time 否 String 查询的截止时间,遵循UTC时间,格式是“yyyy-MM-ddThh:mm:ssZ”。 start_number 否 Integer 查询的起始行号,默认为0。最小值为0。 limit 否 Integer 查询的记录条数,默认为20。取值范围为:0~100。 type 否 String 查询的伸缩活动类型(查询多类型使用逗号分隔): NORMAL:普通伸缩活动 MANNUAL_REMOVE:从伸缩组手动移除实例 MANNUAL_DELETE:从伸缩组手动移除并删除实例 MANNUAL_ADD:实例手动加入伸缩组。 ELB_CHECK_DELETE:ELB检查移除并删除实例。 AUDIT_CHECK_DELETE:通过审计移除并删除实例。 DIFF:期望实例数与实际实例数不一致。 MODIFY_ELB:LB迁移。 ENTER_STANDBY:实例转入备用。 EXIT_STANDBY:实例移出备用。 status 否 String 伸缩活动状态: SUCCESS:成功 FAIL:失败 DOING:伸缩中
  • 请求参数 表2 请求参数 参数 是否必选 参数类型 描述 name 是 String 计划任务名称 scheduled_policy 是 Object 计划任务策略,请参考表3 instance_number 是 Object 伸缩组实例数,请参考表4 表3 scheduled_policy字段数据结构说明 参数 是否必选 参数类型 描述 start_time 否 String 计划任务的生效开始时间。仅当recurrence_type不为空时生效,格式为yyyy-MM-dd'T'HH:mm'Z',不填写时默认为任务创建成功的时间。 end_time 否 String 计划任务的生效结束时间。仅当recurrence_type不为空时生效且必选,格式为yyyy-MM-dd'T'HH:mm'Z'。 launch_time 是 String 计划任务的执行时间。采用UTC时间,当recurrence_type不填写或为空时,格式为yyyy-MM-dd'T'HH:mm'Z',当recurrence_type不为空时,格式为HH:mm。 recurrence_type 否 String 不填写或为空时计划任务为定时执行,填写时计划任务为周期执行,且只能填写DAILY、WEEKLY、MONTHLY 中的一种,分别为按天、按周、按月周期执行。 recurrence_value 否 String 仅当recurrence_type为WEEKLY、MONTHLY时必选,表示周期执行的具体日期,多个日期用,分割,当recurrence_type为WEEKLY时,可填入1-7,当recurrence_type为MONTHLY时,可填入1-31。 表4 instance_number字段数据结构说明 参数 是否必选 参数类型 描述 max 否 Integer 伸缩组最大实例数 min 否 Integer 伸缩组最小实例数 desire 否 Integer 伸缩组期望实例数
  • 请求示例 为伸缩组5bc3aa02-b83e-454c-aba1-4d2095c68f8b,创建了一个每天17:00执行的计划任务,将伸缩组的最大实例数设置为10,最小实例数设置为5。 POST https://{Endpoint}/v1/{project_id}/scaling-groups/5bc3aa02-b83e-454c-aba1-4d2095c68f8b/scheduled-tasks{ "name": "as-scheduled-task-7a75", "scheduled_policy": { "start_time": "2015-12-14T03:34Z", "end_time": "2033-12-27T03:34Z", "launch_time": "17:00", "recurrence_type": "Daily" }, "instance_number": { "max": 10, "min": 5 }}
  • 返回值 正常 200 异常 返回值 说明 400 Bad Request 服务器未能处理请求。 401 Unauthorized 被请求的页面需要用户名和密码。 403 Forbidden 对被请求的页面访问禁止。 404 Not Found 服务器无法找到被请求的页面。 405 Method Not Allowed 请求中指定的方法不被允许。 406 Not Acceptable 服务器生成的响应无法被客户端所接受。 407 Proxy Authentication Required 用户必须首先使用代理服务器进行验证,这样请求才会被处理。 408 Request Timeout 请求超出了服务器的等待时间。 409 Conflict 由于冲突,请求无法被完成。 500 Internal Server Error 请求未完成,服务异常。 501 Not Implemented 请求未完成,服务器不支持所请求的功能。 502 Bad Gateway 请求未完成,服务器从上游服务器收到一个无效的响应。 503 Service Unavailable 请求未完成,系统暂时异常。 504 Gateway Timeout 网关超时。
  • 操作步骤 确定调用API鉴权时使用的token。 查询token,详情请参见获取用户Token。 获取响应Header参数中X-Subject-Token对应的值。 确定要启用的伸缩组。 查询伸缩组列表。 接口相关信息 URI格式:GET /autoscaling-api/v1/{project_id}/scaling_group 详情请参见查询弹性伸缩组列表。 请求示例 示例为查询满足条件“伸缩配置ID为1d281494-6085-4579-b817-c1f813be835f”的伸缩组列表。 GET https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_group?scaling_configuration_id=1d281494-6085-4579-b817-c1f813be835f {endpoint}信息请从地区和终端节点获取。 响应示例 { "limit": 20, "scaling_groups": [ { "networks": [ { "id": "a8327883-6b07-4497-9c61-68d03ee193a", "ipv6_enable": true, "ipv6_bandwidth": { "id": "076ee2ff-f23e-4338-b8ac-1bc7278532d5" } } ], "available_zones": [ "XXXa", "XXXb" ], "detail": null, "scaling_group_name": "as-group-test", "scaling_group_id": "77a7a397-7d2f-4e79-9da9-6a35e2709150", "scaling_group_status": "INSERVICE", "scaling_configuration_id": "1d281494-6085-4579-b817-c1f813be835f", "scaling_configuration_name": "healthCheck", "current_instance_number": 0, "desire_instance_number": 1, "min_instance_number": 0, "max_instance_number": 500, "cool_down_time": 300, "lb_listener_id": "f06c0112570743b51c0e8fbe1f235bab", "security_groups": [ { "id": "8a4b1d5b-0054-419f-84b1-5c8a59ebc829" } ], "create_time": "2015-07-23T02:46:29Z", "vpc_id": "863ccae2-ee85-4d27-bc5b-3ba2a198a9e2", "health_periodic_audit_method": "ELB_AUDIT", "health_periodic_audit_time": 5, "health_periodic_audit_grace_period": 600, "instance_terminate_policy": "OLD_CONFIG_OLD_INSTANCE", "is_scaling": false, "delete_publicip": false, "enterprise_project_id": "c92b1a5d-6f20-43f2-b1b7-7ce35e58e413", "multi_az_priority_policy": "PICK_FIRST" } ], "total_number": 1, "start_number": 0} 选择需要启用的伸缩组,并记录伸缩组ID。 启用选定的弹性伸缩组。 接口相关信息 URI格式:POST /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}/action 详情请参见启用或停止弹性伸缩组。 请求示例 POST: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_group/77a7a397-7d2f-4e79-9da9-6a35e2709150/action {endpoint}信息请从地区和终端节点获取。 Body: { "action": "resume"} 响应示例 HTTP状态码正常返回204。
  • 标签管理 权限 对应API接口 授权项 IAM项目 (Project) 企业项目 (Enterprise Project) 查询标签 GET /autoscaling-api/v1/{project_id}/{resource_type}/tags as:tags:list √ × 查询资源标签 GET /autoscaling-api/v1/{project_id}/{resource_type}/{resource_id}/tags as:tags:get √ × 更新或删除标签 POST /autoscaling-api/v1/{project_id}/{resource_type}/{resource_id}/tags/action as:tags:set √ × 查询资源实例 POST /autoscaling-api/v1/{project_id}/{resource_type}/resource_instances/action as:tagResources:list √ × 父主题: 权限和授权项
  • 监控指标 指标 指标名称 含义 取值范围 备注 cpu_util CPU使用率 该指标用于统计测量对象中所有云服务器的CPU使用率的均值。 ≥0% 测量对象为弹性伸缩组。 mem_util 内存使用率 该指标用于统计测量对象中所有云服务器的内存使用率的均值。 ≥0% 测量对象为弹性伸缩组。 说明: 如果用户使用的镜像未安装vmtools,则无法获取该监控指标。 network_incoming_bytes_rate_inband 带内网络流入速率 该指标用于统计测量对象中所有云服务器的网络流入速率的均值。 ≥0 Byte/s 测量对象为弹性伸缩组。 network_outgoing_bytes_rate_inband 带内网络流出速率 该指标用于统计测量对象中所有云服务器的网络流出速率的均值。 ≥0 Byte/s 测量对象为弹性伸缩组。 instance_num 实例数 该指标用于统计测量对象中可用的云服务器数量。 ≥0 测量对象为弹性伸缩组。 可用的云服务器是指伸缩组中生命周期状态为“INSERVICE”的实例。 disk_read_bytes_rate 磁盘读速率 该指标用于统计每秒从测量对象中所有云服务器读出的数据量,以字节/秒为单位。 ≥0 Byte/s 测量对象为弹性伸缩组。 disk_write_bytes_rate 磁盘写速率 该指标用于统计每秒写到测量对象中所有云服务器的数据量,以字节/秒为单位。 ≥0 Byte/s 测量对象为弹性伸缩组。 disk_read_requests_rate 磁盘读操作速率 该指标用于统计每秒从测量对象中所有云服务器读取数据的请求次数,以请求/秒为单位。 ≥0 request/s 测量对象为弹性伸缩组。 disk_write_requests_rate 磁盘写操作速率 该指标用于统计每秒往测量对象中所有云服务器写数据的请求次数,以请求/秒为单位。 ≥0 request/s 测量对象为弹性伸缩组。 对于不同的操作系统,监控指标“内存使用率”、“带内网络流出速率”和“带内网络流入速率”是否支持,详细信息请参见《弹性云服务器用户指南》。
  • 操作步骤 确定调用API鉴权时使用的token。 查询token,详情请参见获取用户Token。 获取响应Header参数中X-Subject-Token对应的值。 确定要创建伸缩策略的伸缩组。 查询伸缩组列表。 接口相关信息 URI格式:GET /autoscaling-api/v1/{project_id}/scaling_group 详情请参见查询弹性伸缩组列表。 请求示例 GET: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_group {endpoint}信息请从地区和终端节点获取。 响应示例 { "limit": 20, "scaling_groups": [ { "networks": [ { "id": "a8327883-6b07-4497-9c61-68d03ee193a", "ipv6_enable": true, "ipv6_bandwidth": { "id": "076ee2ff-f23e-4338-b8ac-1bc7278532d5" } } ], "available_zones": [ "XXXa", "XXXb" ], "detail": null, "scaling_group_name": "as-group-test", "scaling_group_id": "77a7a397-7d2f-4e79-9da9-6a35e2709150", "scaling_group_status": "INSERVICE", "scaling_configuration_id": "1d281494-6085-4579-b817-c1f813be835f", "scaling_configuration_name": "healthCheck", "current_instance_number": 0, "desire_instance_number": 1, "min_instance_number": 0, "max_instance_number": 500, "cool_down_time": 300, "lb_listener_id": "f06c0112570743b51c0e8fbe1f235bab", "security_groups": [ { "id": "8a4b1d5b-0054-419f-84b1-5c8a59ebc829" } ], "create_time": "2015-07-23T02:46:29Z", "vpc_id": "863ccae2-ee85-4d27-bc5b-3ba2a198a9e2", "health_periodic_audit_method": "ELB_AUDIT", "health_periodic_audit_time": 5, "health_periodic_audit_grace_period": 600, "instance_terminate_policy": "OLD_CONFIG_OLD_INSTANCE", "is_scaling": false, "delete_publicip": false, "enterprise_project_id": "c92b1a5d-6f20-43f2-b1b7-7ce35e58e413", "multi_az_priority_policy": "PICK_FIRST" }],"total_number": 1,"start_number": 0} 选择要创建伸缩策略的伸缩组,并记录伸缩组ID。 为指定的伸缩组创建伸缩策略。 接口相关信息 URI格式:POST /autoscaling-api/v1/{project_id}/scaling_policy 详情请参见创建弹性伸缩策略。 请求示例 示例为创建一个名称为as-policy-7a75的周期策略,该策略的生效时间为2015-12-14T03:34Z到2015-12-27T03:34Z,每天16:00在ID为5bc3aa02-b83e-454c-aba1-4d2095c68f8b的伸缩组中增加一个实例。 POST: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_policy {endpoint}信息请从地区和终端节点获取。 Body: { "scaling_policy_name": "as-policy-7a75", "scaling_policy_action": { "operation": "ADD", "instance_number": 1 }, "cool_down_time": 900, "scheduled_policy": { "launch_time": "16:00", "recurrence_type": "Daily", "start_time": "2015-12-14T03:34Z", "end_time": "2015-12-27T03:34Z" }, "scaling_policy_type": "RECURRENCE", "scaling_group_id": "5bc3aa02-b83e-454c-aba1-4d2095c68f8b"} 响应示例 { "scaling_policy_id": "0h327883-324n-4dzd-9c61-68d03ee191dd"} 确认伸缩策略创建成功。 接口相关信息 URI格式:GET /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id} 详情请参见查询弹性伸缩策略详情。 请求示例 本示例展示了查询ID为0h327883-324n-4dzd-9c61-68d03ee191dd的伸缩策略的详情信息。 GET: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_policy/fd7d63ce-8f5c-443e-b9a0-bef9386b23b3 {endpoint}信息请从地区和终端节点获取。 响应示例 { "scaling_policy": { "scaling_policy_id": "fd7d63ce-8f5c-443e-b9a0-bef9386b23b3", "scaling_group_id": "e5d27f5c-dd76-4a61-b4bc-a67c5686719a", "scaling_policy_name": "定时1", "scaling_policy_type": "SCHEDULED", "scheduled_policy": { "launch_time": "2015-07-24T01:21Z" }, "cool_down_time": 300, "scaling_policy_action": { "operation": "REMOVE", "instance_number": 1 }, "policy_status": "INSERVICE", "create_time": "2015-07-24T01:09:30Z" }}
  • 返回值 正常 204 异常 返回值 说明 400 Bad Request 服务器未能处理请求。 401 Unauthorized 被请求的页面需要用户名和密码。 403 Forbidden 对被请求的页面访问禁止。 404 Not Found 服务器无法找到被请求的页面。 405 Method Not Allowed 请求中指定的方法不被允许。 406 Not Acceptable 服务器生成的响应无法被客户端所接受。 407 Proxy Authentication Required 用户必须首先使用代理服务器进行验证,这样请求才会被处理。 408 Request Timeout 请求超出了服务器的等待时间。 409 Conflict 由于冲突,请求无法被完成。 500 Internal Server Error 请求未完成。服务异常。 501 Not Implemented 请求未完成。服务器不支持所请求的功能。 502 Bad Gateway 请求未完成。服务器从上游服务器收到一个无效的响应。 503 Service Unavailable 请求未完成。系统暂时异常。 504 Gateway Timeout 网关超时。
  • 操作步骤 确定调用API鉴权时使用的token。 查询token,详情请参见获取用户Token。 获取响应Header参数中X-Subject-Token对应的值。 确定要进行批量操作的伸缩组。 查询伸缩组列表。 接口相关信息 URI格式:GET /autoscaling-api/v1/{project_id}/scaling_group 详情请参见查询弹性伸缩组列表。 请求示例 GET: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_group {endpoint}信息请从地区和终端节点获取。 响应示例 { "limit": 20, "scaling_groups": [ { "networks": [ { "id": "a8327883-6b07-4497-9c61-68d03ee193a", "ipv6_enable": true, "ipv6_bandwidth": { "id": "076ee2ff-f23e-4338-b8ac-1bc7278532d5" } } ], "available_zones": [ "XXXa", "XXXb" ], "detail": null, "scaling_group_name": "as-group-test", "scaling_group_id": "77a7a397-7d2f-4e79-9da9-6a35e2709150", "scaling_group_status": "INSERVICE", "scaling_configuration_id": "1d281494-6085-4579-b817-c1f813be835f", "scaling_configuration_name": "healthCheck", "current_instance_number": 0, "desire_instance_number": 1, "min_instance_number": 0, "max_instance_number": 500, "cool_down_time": 300, "lb_listener_id": "f06c0112570743b51c0e8fbe1f235bab", "security_groups": [ { "id": "8a4b1d5b-0054-419f-84b1-5c8a59ebc829" } ], "create_time": "2015-07-23T02:46:29Z", "vpc_id": "863ccae2-ee85-4d27-bc5b-3ba2a198a9e2", "health_periodic_audit_method": "ELB_AUDIT", "health_periodic_audit_time": 5, "health_periodic_audit_grace_period": 600, "instance_terminate_policy": "OLD_CONFIG_OLD_INSTANCE", "is_scaling": false, "delete_publicip": false, "enterprise_project_id": "c92b1a5d-6f20-43f2-b1b7-7ce35e58e413", "multi_az_priority_policy": "PICK_FIRST" }],"total_number": 1,"start_number": 0} 选择要操作实例的伸缩组,并记录伸缩组ID。 获取指定伸缩组实例列表。 查询弹性伸缩组中的实例列表。 接口相关信息 URI格式:GET /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/list 详情请参见查询弹性伸缩组中的实例列表。 请求示例 本示例展示了查询ID为e5d27f5c-dd76-4a61-b4bc-a67c5686719a的伸缩组下已启用且处于健康状态的实例。 GET: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_group_instance/e5d27f5c-dd76-4a61-b4bc-a67c5686719a/list?life_cycle_state=INSERVICE&health_status=NORMAL {endpoint}信息请从地区和终端节点获取。 响应示例 { "limit": 10, "total_number": 1, "start_number": 0, "scaling_group_instances": [ { "instance_id": "b25c1589-c96c-465b-9fef-d06540d1945c", "scaling_group_id": "e5d27f5c-dd76-4a61-b4bc-a67c5686719a", "scaling_group_name": "discuz", "life_cycle_state": "INSERVICE", "health_status": "NORMAL", "scaling_configuration_name": "discuz", "scaling_configuration_id": "ca3dcd84-d197-4c4f-af2a-cf8ba39696ac", "create_time": "2015-07-23T06:47:33Z", "instance_name": "discuz_3D210808", "protect_from_scaling_down": false } ]} 选择需要操作的实例,并记录实例ID。 批量移出实例。 接口相关信息 URI格式:POST /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/action 详情请参见批量操作实例。 请求示例 本示例展示将实例ID为instance_id_1和instance_id_2的两个实例批量从ID为e5d27f5c-dd76-4a61-b4bc-a67c5686719a的伸缩组移出并删除的操作。 POST: https://{endpoint}/autoscaling-api/v1/0605767c2e80d5762fd0c0146a10aaf2/scaling_group_instance/e5d27f5c-dd76-4a61-b4bc-a67c5686719a/action {endpoint}信息请从地区和终端节点获取。 Body: {"action": "REMOVE","instances_id": ["instance_id_1","instance_id_2"],"instance_delete": "yes"} 响应示例 HTTP状态码正常返回204。
  • 响应示例 { "version": { "id": "v1", "links": [ { "href": "https://as.XXX.mycloud.com/autoscaling-api/v1/", "rel": "self" } ], "min_version": "", "status": "CURRENT", "updated": "2016-06-30T00:00:00Z", "version": "" }}
  • 响应参数 表2 响应参数 参数 参数类型 描述 version version object 描述弹性伸缩API指定版本信息。 表3 version字段数据结构说明 参数 参数类型 描述 id String API版本ID links Array of links objects API 的url地址,详情请见表4 links字段数据结构说明。 min_version String API支持的最小微版本 status String API版本状态: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还在继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。 updated String API版本发布时间 version String API支持的最大微版本号 表4 links字段数据结构说明 参数 参数类型 描述 href String API的url地址 rel String API的url地址依赖
  • 返回值 正常 200 异常 返回值 说明 400 Bad Request 服务器未能处理请求。 401 Unauthorized 被请求的页面需要用户名和密码。 403 Forbidden 对被请求的页面访问禁止。 404 Not Found 服务器无法找到被请求的页面。 405 Method Not Allowed 请求中指定的方法不被允许。 406 Not Acceptable 服务器生成的响应无法被客户端所接受。 407 Proxy Authentication Required 用户必须首先使用代理服务器进行验证,这样请求才会被处理。 408 Request Timeout 请求超出了服务器的等待时间。 409 Conflict 由于冲突,请求无法被完成。 500 Internal Server Error 请求未完成。服务异常。 501 Not Implemented 请求未完成。服务器不支持所请求的功能。 502 Bad Gateway 请求未完成。服务器从上游服务器收到一个无效的响应。 503 Service Unavailable 请求未完成。系统暂时异常。 504 Gateway Timeout 网关超时。
共100000条
提示

您即将访问非华为云网站,请注意账号财产安全