云应用引擎 CAE-创建组件:响应示例

时间:2024-11-14 17:12:18

响应示例

状态码: 200

请求成功。

{
  "api_version": "v1",
  "kind": "Component",
  "metadata": {
    "id": "cac09548-047f-46c4-abbd-a6a652305565",
    "name": "test-code",
    "annotations": {
      "log_group_id": "5b13213a-84f8-4b72-8ca5-530e15cc1402",
      "log_stream_id": "6ddf6c71-4767-46db-98a2-fe5fb301b366",
      "version": "1.0.0"
    },
    "created_at": "2023-02-13T02:38:22.689607114Z",
    "updated_at": "2023-02-13T02:38:22.689607114Z"
  },
  "spec": {
    "runtime": "Java8",
    "env_id": "9819b3f5-dd08-44ff-ba88-eb38e435594c",
    "replica": 1,
    "source": {
      "type": "code",
      "sub_type": "GitLab",
      "url": "http://xxx@cpe.gitlab.com:8090/xxx/cae-backend.git",
      "code": {
        "branch": "master",
        "auth_name": "gitlab-xxx",
        "namespace": "em1n"
      }
    },
    "build": {
      "archive": {
        "artifact_namespace": "xxx"
      },
      "parameters": {
        "base_image": "openjdk:8u181-jdk-alpine"
        "dockerfile_path": "./Dockerfile"
      }
    },
    "resource_limit": {
      "cpu_limit": "500m",
      "memory_limit": "1Gi"
    },
    "available_replica": 0,
    "status": "created"
  }
}
support.huaweicloud.com/api-cae/CreateComponent.html