文档中心 > API类目 > 云游戏API

alibaba.cloudgame.ops.scale.submit (弹性扩缩接口)

弹性扩缩接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
submit_scale_request SubmitAppScaleRequest 必须 提交scale工单
  • └ app_name
  • String
  • 必须
  • xxx
  • appName
  • └ ops_work_id
  • String
  • 必须
  • xxx
  • opsWorkId
  • └ app_env_name
  • String
  • 必须
  • xxx
  • appEnvName
  • └ app_env_level
  • String
  • 必须
  • xxx
  • appEnvLevel
  • └ app_env_v_group
  • String
  • 必须
  • xxx
  • appEnvVGroup
  • └ target_replicas
  • Number
  • 必须
  • 1
  • targetReplicas
  • └ batches
  • Number
  • 必须
  • 1
  • batches

响应参数

名称 类型 示例值 描述
result Result 返回结果
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ msg_code
  • String
  • xxx
  • 结果码
  • └ msg_info
  • String
  • xxx
  • 结果信息
  • model
  • AppScaleResultDTO
  • xxx
  • 结果数据对象
  • └ resp
  • String
  • xxx
  • 返回resp

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCloudgameOpsScaleSubmitRequest req = new AlibabaCloudgameOpsScaleSubmitRequest();
AlibabaCloudgameOpsScaleSubmitRequest.SubmitAppScaleRequest obj1 = new AlibabaCloudgameOpsScaleSubmitRequest.SubmitAppScaleRequest();
obj1.setAppName("xxx");
obj1.setOpsWorkId("xxx");
obj1.setAppEnvName("xxx");
obj1.setAppEnvLevel("xxx");
obj1.setAppEnvVGroup("xxx");
obj1.setTargetReplicas(1L);
obj1.setBatches(1L);
req.setSubmitScaleRequest(obj1);
AlibabaCloudgameOpsScaleSubmitResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_cloudgame_ops_scale_submit_response>
    <result>
        <success>true</success>
        <msg_code>xxx</msg_code>
        <msg_info>xxx</msg_info>
        <model>
            <resp>xxx</resp>
        </model>
    </result>
</alibaba_cloudgame_ops_scale_submit_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部