有奖捉虫:云通信与企业服务文档专题,速来> HOT

1. 接口描述

本接口(DescribeComputeEnvCreateInfo)用于查看一个计算环境的创建信息,相当于查看计算环境对应的 CreateComputeEnv 的参数,其返回内容包括 EnvId 和 CreateComputeEnv 接口中作为输入参数的作业提交信息
接口请求域名:batch.api.qcloud.com

2. 输入参数

名称 类型 是否必选 描述
Version String API 版本号
EnvId String 计算环境唯一标识

3. 输出参数

名称 类型 描述
RequestId String 唯一请求 ID。每次请求都会返回 RequestId。当用户调用接口失败找后台研发人员处理时需提供该 RequestId。
EnvId String 计算环境 ID
EnvName String 计算环境名称
EnvDescription String 计算环境描述
EnvType String 计算环境类型,仅支持“MANAGED”类型
EnvData EnvData object 计算环境参数
MountDataDisks array of MountDataDisk objects 数据盘挂载选项
InputMappings array of InputMapping objects 输入映射
Authentications array of Authentication objects 授权信息
Notifications array of Notification objects 通知信息
DesiredComputeNodeCount Integer 计算节点期望个数

备注:EnvData\MountDataDisk\InputMapping\Authentication\Notifications 等字段参考 SubmitJob 和 CreateComputeEnv 接口。

{
  "Response": {
    "EnvId": "env-qleawxzt",
    "EnvType": "MANAGED",
    "DesiredComputeNodeCount": 2,
    "EnvName": "test compute env",
    "EnvDescription": "test compute env",
    "InputMappings": [
      {
        "SourcePath": "cos://bucket-appid.cos.ap-hongkong.myqcloud.com/",
        "DestinationPath": "/mnt/disk/"
      },
      {
        "SourcePath": "cos://bucket-appid.cos.ap-hongkong.myqcloud.com/test/",
        "DestinationPath": "/mnt/input/"
      }
    ],
     "Notifications": [
      {
        "TopicName": "topic name",
        "EventConfigs": [
          {
            "EventName": "COMPUTE_ENV_DELETED",
            "EventVars": [
              {
                "Name": "name1",
                "Value": "value1"
              },
              {
                "Name": "name2",
                "Value": "value2"
              }
            ]
          }
        ]
      }
    ],
    "EnvData": {
      "VirtualPrivateCloud": {
        "SubnetId": "subnet-8axej2jc",
        "VpcId": "vpc-cg18la4l"
      },
      "SystemDisk": {
        "DiskSize": 50,
        "DiskType": "CLOUD_BASIC"
      },
      "InternetAccessible": {
        "PublicIpAssigned": "TRUE",
        "InternetMaxBandwidthOut": 50
      },
      "ImageId": "img-bd78fy2t",
      "InstanceType": "S1.SMALL2",
      "DataDisks": [
        {
          "DiskSize": 50,
          "DiskType": "CLOUD_BASIC"
        }
      ]
    },
    "RequestId": "578f3fae-6908-4521-ac07-17c2cffcd5ae"
  }
}

4. 错误码

错误码 描述
ComputeEnvNotFound 指定计算环境不存在。
InvalidBatchEnvId.Malformed 非法的计算环境ID格式。
InternalServerError 内部服务错误。