根据组件ID获取组件信息
功能介绍
此API用于通过组件ID获取组件信息。
URI
GET /v3/{project_id}/cas/applications/{application_id}/components/{component_id}
请求消息
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        Content-Type  | 
      
        是  | 
      
        String  | 
      
        消息体的类型(格式),默认取值为“application/json;charset=utf8”。  | 
     
| 
        X-Auth-Token  | 
      
        是  | 
      
        String  | 
      
        调用接口的认证方式分为Token和AK/SK两种,如果您使用的Token方式,此参数为必填,请填写Token的值。Token获取方式,请参考认证鉴权。  | 
     
响应消息
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        name  | 
      
        String  | 
      
        应用组件名称。 由英文字母、数字、中划线(-)、下划线(_)组成,并以英文字母开头,英文字母或者数字结尾,不区分英文字母大小写,长度为2~64个字符。  | 
     
| 
        workload_name  | 
      
        String  | 
      
        工作负载名称。  | 
     
| 
        labels  | 
      
        Array of objects  | 
      
        标签。容器部署可通过标签查询对应工作负载,虚机部署可配置对应的微服务名称的标签来使用优雅上下线功能,请参考表5。  | 
     
| 
        runtime_stack  | 
      
        Object  | 
      |
| 
        environment_id  | 
      
        String  | 
      
        环境ID。  | 
     
| 
        application_id  | 
      
        String  | 
      
        应用ID。  | 
     
| 
        description  | 
      
        String  | 
      
        描述。 最大长度为128个字符。  | 
     
| 
        source  | 
      
        Object  | 
      
        代码/软件包来源,请参考表33。  | 
     
| 
        build  | 
      
        Object  | 
      
        组件构建,请参考表34。  | 
     
| 
        limit_cpu  | 
      
        Number  | 
      
        最大CPU限制,单位为Core。  | 
     
| 
        limit_memory  | 
      
        Number  | 
      
        最大内存限制,单位为GiB。  | 
     
| 
        request_cpu  | 
      
        Number  | 
      
        申请CPU资源,单位为Core。  | 
     
| 
        request_memory  | 
      
        Number  | 
      
        申请内存资源,单位为GiB。  | 
     
| 
        version  | 
      
        String  | 
      
        组件版本号,最大长度32个字符,规则为: ^([0-9]+)(.[0-9]+){2,3}$  | 
     
| 
        envs  | 
      
        Array of objects  | 
      
        环境变量列表,请参考表30。  | 
     
| 
        replica  | 
      
        Integer  | 
      
        实例数。  | 
     
| 
        storages  | 
      
        Array of objects  | 
      
        存储,请参考表6。  | 
     
| 
        deploy_strategy  | 
      
        Object  | 
      
        组件部署,请参考表9。  | 
     
| 
        command  | 
      
        Object  | 
      
        启动命令,请参考表14  | 
     
| 
        post_start  | 
      
        Object  | 
      
        启动后处理,请参考表15。  | 
     
| 
        pre_stop  | 
      
        Object  | 
      
        停止前处理,请参考表15。  | 
     
| 
        mesher  | 
      
        Object  | 
      
        多语言接入服务网格,当技术栈选择Nodejs且绑定cse引擎时为必选,请参考表16。  | 
     
| 
        timezone  | 
      
        String  | 
      
        指定组件运行的时区,比如Asia/Shanghai。  | 
     
| 
        jvm_opts  | 
      
        String  | 
      
        jvm参数,例如-Xms256m -Xmx1024m,多个参数以空格间隔,不填则使用默认值。  | 
     
| 
        tomcat_opts  | 
      
        Object  | 
      
        tomcat参数,技术栈选择tomcat时生效,请参考表17。  | 
     
| 
        host_aliases  | 
      
        Array of objects  | 
      
        主机别名,请参考表18。  | 
     
| 
        dns_policy  | 
      
        String  | 
      
        DNS策略。 
  | 
     
| 
        dns_config  | 
      
        Object  | 
      
        DNS配置,请参考表19。  | 
     
| 
        workload_kind  | 
      
        String  | 
      
        工作负载类型。 
  | 
     
| 
        security_context  | 
      
        Object  | 
      
        安全策略,请参考表21。  | 
     
| 
        logs  | 
      
        Array of objects  | 
      
        日志采集,请参考表23。  | 
     
| 
        custom_metric  | 
      
        Object  | 
      
        自定义指标监控,请参考表24。  | 
     
| 
        affinity  | 
      
        Array of objects  | 
      
        亲和性,请参考表25。  | 
     
| 
        anti_affinity  | 
      
        Array of objects  | 
      
        反亲和性,请参考表25。  | 
     
| 
        liveness_probe  | 
      
        Array of objects  | 
      
        组件存活探针,请参考表27。  | 
     
| 
        readiness_probe  | 
      
        Object  | 
      
        组件业务探针,请参考表27。  | 
     
| 
        refer_resources  | 
      
        Array of objects  | 
      
        关联资源,请参考表28。  | 
     
| 
        status  | 
      
        Object  | 
      
        组件状态,请参考表36。  | 
     
| 
        tolerations  | 
      
        Array of Objects  | 
      
        容忍度策略,请参考表38。  | 
     
| 
        container_name  | 
      
        String  | 
      
        容器名称。  | 
     
| 
        update_strategy  | 
      
        Object  | 
      
        组件升级策略,请参考表40。  | 
     
| 
        multi_containers  | 
      
        Array of Objects  | 
      
        多容器配置,请参考表39。  | 
     
| 
        service_name  | 
      
        String  | 
      
        有状态负载的实例间发现服务配置Service名称。  | 
     
| 
        ports  | 
      
        Array of Objects  | 
      
        有状态负载的实例间发现服务配置端口配置。  | 
     
| 
        enterprise_project_id  | 
      
        String  | 
      
        企业项目ID。  | 
     
| 
        swimlane_tag  | 
      
        String  | 
      
        泳道标签。  | 
     
| 
        swimlane_id  | 
      
        String  | 
      
        所属泳道ID。  | 
     
| 
        base_lane_instance_id  | 
      
        String  | 
      
        关联基线泳道的基线组件ID,用于标识基线组件和灰度组件的关联关系。  | 
     
| 
        refer_resources  | 
      
        Array of Objects  | 
      
        关联资源,请参考表28。  | 
     
| 
        runtime_stack_id  | 
      
        String  | 
      
        运行时ID。  | 
     
| 
        component_id  | 
      
        String  | 
      
        组件ID。  | 
     
| 
        deploy_type  | 
      
        String  | 
      
        部署类型。 
  | 
     
| 
        platform_type  | 
      
        String  | 
      
        运行平台类型,应用可以在不同的平台上运行,可选用的平台的类型有以下几种: 
  | 
     
| 
        config_mode  | 
      
        String  | 
      
        工作负载配置模式。 
  | 
     
| 
        workload_content  | 
      
        String  | 
      
        工作负载内容。  | 
     
| 
        workload_name  | 
      
        String  | 
      
        工作负载名称。  | 
     
| 
        instance_id  | 
      
        String  | 
      
        组件实例ID。  | 
     
| 
        sys_config  | 
      
        Map<String,String>  | 
      
        使用压缩包在虚拟机环境下部署组件配置项。  | 
     
| 
        configs  | 
      
        Array of Objects  | 
      
        配置文件列表,请参考表41。  | 
     
| 
        enable_sermant_injection  | 
      
        Boolean  | 
      
        是否开启Sermant。  | 
     
| 
        enable_sermant_spring_register  | 
      
        Boolean  | 
      
        Spring Cloud Huawei框架的微服务是否需要Sermant帮助注册到注册中心。  | 
     
| 
        enable_sermant_dubbo_register  | 
      
        Boolean  | 
      
        Dubbo框架的微服务是否需要Sermant帮助注册到注册中心。  | 
     
| 
        enable_sermant_config  | 
      
        Boolean  | 
      
        是否开启Sermant动态配置插件能力。  | 
     
| 
        enable_sermant_mq_gray  | 
      
        Boolean  | 
      
        是否开启Sermant消息灰度能力。  | 
     
| 
        image_pull_secrets  | 
      
        Array of String  | 
      
        镜像拉取密钥列表。  | 
     
| 
        template_source  | 
      
        Object  | 
      
        组件模板包来源,请参考表42。  | 
     
| 
        template_content  | 
      
        Object  | 
      
        组件模板包内容,请参考表44。  | 
     
| 
        resource_content  | 
      
        Object  | 
      
        组件模板包资源详情,请参考表45。  | 
     
| 
        auto_lts_config  | 
      
        Object  | 
      
        LTS自动配置,请参考表48。  | 
     
| 
        config_encryption  | 
      
        Object  | 
      
        单容器组件配置加密密钥时需设置,请参考表49。  | 
     
| 
        task_setting  | 
      
        Object  | 
      
        job类型工作负载的任务设置,请参考表50。  | 
     
| 
        vmapp_config_mode  | 
      
        String  | 
      
        虚拟机部署方式部署组件的目录类型。 
  | 
     
| 
        vmapp_config  | 
      
        Object  | 
      
        虚拟机部署方式部署组件的目录配置,请参考表51。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        type  | 
      
        String  | 
      
        数据存储类型。 
  | 
     
| 
        name  | 
      
        String  | 
      
        存储盘名称。  | 
     
| 
        parameters  | 
      
        Object  | 
      
        对应各种数据存储类型的信息参数,请参考表7。  | 
     
| 
        mounts  | 
      
        Array of objects  | 
      
        数据存储挂载路径,请参考表8。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        path  | 
      
        String  | 
      
        主机路径, 适用于HostPath的存储类型。  | 
     
| 
        name  | 
      
        String  | 
      
        配置项、密钥或者PVC的名字, 适用于ConfigMap、Secret和PersistentVolumeClaim的存储类型。  | 
     
| 
        default_mode  | 
      
        Integer  | 
      
        挂载的权限,十进制格式,例如:384。适用于ConfigMap和Secret的存储类型。  | 
     
| 
        medium  | 
      
        String  | 
      
        适用于EmptyDir类型的存储,例如:memory。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        type  | 
      
        String  | 
      
        部署类型。 
  | 
     
| 
        rolling_release  | 
      
        Object  | 
      
        滚动部署参数,请参考表10。  | 
     
| 
        gray_release  | 
      
        Object  | 
      
        灰度发布升级,请参考表12。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        batches  | 
      
        Integer  | 
      
        分批部署批次。  | 
     
| 
        first_batch_selector  | 
      
        Object  | 
      
        容器组件对应的工作负载下实例的优先重启策略,请参考表11。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        key  | 
      
        String  | 
      
        容器工作负载yaml中“metadata.labels”下的标签key。  | 
     
| 
        operator  | 
      
        String  | 
      
        操作符,表示key和values的所属关系。 Exists:key存在。 DoesNotExist:key不存在。 In:key在values里面。 NotIn:key不在values里面。  | 
     
| 
        values  | 
      
        Array of String  | 
      
        容器工作负载yaml中“metadata.labels”下的标签key对应的值。operator为“In&NotIn”时,存在values。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        type  | 
      
        String  | 
      
        灰度策略。 
  | 
     
| 
        first_batch_weight  | 
      
        Integer  | 
      
        首批灰度流量比例,灰度策略为WEIGHT时有效。  | 
     
| 
        first_batch_replica  | 
      
        Integer  | 
      
        首批灰度实例数量,灰度策略为WEIGHT时有效。  | 
     
| 
        remaining_batch  | 
      
        Integer  | 
      
        剩余实例部署批次,首批灰度发布成功之后,剩余实例滚动升级分多少批次完成。 例如:剩余实例数是5,剩余部署批次是3,那么升级剩余实例会按照2:2:1个实例分批升级。 灰度策略为WEIGHT时有效。  | 
     
| 
        deployment_mode  | 
      
        Integer  | 
      
        部署模型。 
  | 
     
| 
        replica_surge_mode  | 
      
        String  | 
      
        灰度实例新增模式,灰度策略为CONTENT时有效。 
  | 
     
| 
        rule_match_mode  | 
      
        String  | 
      
        灰度规则生效方式,灰度策略为CONTENT时有效。 
  | 
     
| 
        rules  | 
      
        Object  | 
      
        灰度规则,灰度策略为CONTENT时有效,请参考表13。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        type  | 
      
        String  | 
      
        匹配类型。当前仅支持:HEADER,请求头。  | 
     
| 
        key  | 
      
        String  | 
      
        参数名称。  | 
     
| 
        value  | 
      
        String  | 
      
        条件值。  | 
     
| 
        condition  | 
      
        String  | 
      
        条件类型。 
  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        command  | 
      
        Array of String  | 
      
        运行命令,控制容器运行的输入命令。  | 
     
| 
        args  | 
      
        Array of String  | 
      
        运行参数,控制容器运行命令的输入参数。例如:-port=8080,多条参数以换行分隔。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        type  | 
      
        String  | 
      
        处理方式。 
  | 
     
| 
        scheme  | 
      
        String  | 
      
        http请求类型参数:HTTP、HTTPS。type为http类型时生效。  | 
     
| 
        host  | 
      
        String  | 
      
        默认为POD的IP,可以指定自定义的IP。type为http类型时生效。  | 
     
| 
        port  | 
      
        Integer  | 
      
        端口号,type为http类型时生效。  | 
     
| 
        path  | 
      
        String  | 
      
        请求路径,type为http类型时生效。  | 
     
| 
        command  | 
      
        Array of String  | 
      
        命令列表,type为command类型时生效。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        server_xml  | 
      
        String  | 
      
       
  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        nameservers  | 
      
        Array of String  | 
      
        Pod的DNS服务器的IP地址列表。  | 
     
| 
        searches  | 
      
        Array of String  | 
      
        用于在Pod中查找主机名的DNS搜索域的列表。  | 
     
| 
        options  | 
      
        Array of objects  | 
      
        可选的对象列表,其中每个对象可能具有name属性(必需)和value属性(可选)。 此属性中的内容将合并到从指定的DNS策略生成的选项。重复的条目将被删除。请参考表20。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        run_as_user  | 
      
        Integer  | 
      
        运行用户,容器以当前用户权限运行,如以root权限运行则填写root用户ID 0。  | 
     
| 
        run_as_group  | 
      
        Integer  | 
      
        运行属组,指定所有容器中的进程都以属组运行。  | 
     
| 
        capabilities  | 
      
        Object  | 
      
        能力集,请参考表22。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        log_path  | 
      
        String  | 
      
        容器中日志路径。  | 
     
| 
        rotate  | 
      
        String  | 
      
        日志转储周期。  | 
     
| 
        host_path  | 
      
        String  | 
      
        挂载的主机路径。  | 
     
| 
        host_extend_path  | 
      
        String  | 
      
        主机扩展路径,通过扩展主机路径,实现同一个主机路径下区分来自不同容器的挂载: 
  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        path  | 
      
        String  | 
      
        采集路径,例如:/metrics。  | 
     
| 
        port  | 
      
        Integer  | 
      
        采集端口,例如:9090。  | 
     
| 
        dimensions  | 
      
        String  | 
      
        监控维度,例如:"cpu_usage,mem_usage"。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        kind  | 
      
        String  | 
      
        对象类型。 
  | 
     
| 
        condition  | 
      
        String  | 
      
        策略满足类型。 
  | 
     
| 
        match_expressions  | 
      
        Array of objects  | 
      
        调度策略规则,请参考表26。  | 
     
| 
        weight  | 
      
        String  | 
      
        权重。 
  | 
     
| 
        topology_key  | 
      
        String  | 
      
        拓扑域。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        key  | 
      
        String  | 
      
        匹配标签key值。  | 
     
| 
        operation  | 
      
        String  | 
      
        匹配条件。  | 
     
| 
        value  | 
      
        String  | 
      
        匹配标签value值。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        type  | 
      
        String  | 
      
        类型:http、tcp、command。  | 
     
| 
        delay  | 
      
        Integer  | 
      
        启动后多久开始探测。  | 
     
| 
        timeout  | 
      
        Integer  | 
      
        探测超时时间  | 
     
| 
        scheme  | 
      
        String  | 
      
        请求类型:HTTP、HTTPS,type为http类型时生效。  | 
     
| 
        host  | 
      
        String  | 
      
        默认为POD的IP,可以指定自定义的IP。type为http类型时生效。  | 
     
| 
        port  | 
      
        Integer  | 
      
        端口号,type为http和tcp类型时生效。  | 
     
| 
        path  | 
      
        String  | 
      
        请求路径,type为http类型时生效。  | 
     
| 
        command  | 
      
        Array of String  | 
      
        命令列表,type为command类型时生效。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        id  | 
      
        String  | 
      
        资源ID。  | 
     
| 
        type  | 
      
        String  | 
      
        资源类型。 
  | 
     
| 
        parameters  | 
      
        Object  | 
      
        资源参数,请参考表29。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        namespace  | 
      
        String  | 
      
        命名空间。  | 
     
| 
        name  | 
      
        String  | 
      
        资源名称。  | 
     
| 
        capacity  | 
      
        Integer  | 
      
        存储容量,单位GiB。  | 
     
| 
        type  | 
      
        String  | 
      
        存储卷声明类型。当表28中的为pvc时指定。 
  | 
     
| 
        class  | 
      
        String  | 
      
        存储卷声明子类型。 
  | 
     
| 
        pv_name  | 
      
        String  | 
      
        存储卷名称。type为efs时展示。  | 
     
| 
        share_id  | 
      
        String  | 
      
        存储卷句柄。type为efs时展示。  | 
     
| 
        share_export_location  | 
      
        String  | 
      
        存储卷共享路径。type为efs时展示。  | 
     
| 
        share_proto  | 
      
        String  | 
      
        存储卷文件系统类型。type为efs时展示。默认为NFS。  | 
     
| 
        obs_volume_type  | 
      
        String  | 
      
        OBS存储卷类型,默认为STANDARD标准存储类型。  | 
     
| 
        access_mode  | 
      
        String  | 
      
        存储卷访问模式。 
  | 
     
| 
        availableZone  | 
      
        String  | 
      
        可用区。  | 
     
| 
        volume_type  | 
      
        String  | 
      
        存储卷类型。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        reference_type  | 
      
        String  | 
      
        引用类型。 
  | 
     
| 
        name  | 
      
        String  | 
      
        配置项或密钥的名称。  | 
     
| 
        key  | 
      
        String  | 
      
        配置项或密钥的键值。  | 
     
| 
        optional  | 
      
        Boolean  | 
      
        配置项或密钥的key是否必须存在。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        name  | 
      
        String  | 
      
        技术栈名称  | 
     
| 
        type  | 
      
        String  | 
      
        技术栈类型,支持Java、Tomcat、Nodejs、Php、Docker、Python。 当部署模式为虚机部署时,仅支持Java、Tomcat、Nodejs;容器部署上述类型都支持。  | 
     
| 
        version  | 
      
        String  | 
      
        技术栈版本。  | 
     
| 
        deploy_mode  | 
      
        String  | 
      
        部署模式。 
  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        kind  | 
      
        String  | 
      
        组件来源类型。 
  | 
     
| 
        version  | 
      
        String  | 
      
        版本号。  | 
     
| 
        url  | 
      
        String  | 
      
        包地址,类型为package和image时需要添加。  | 
     
| 
        storage  | 
      
        String  | 
      
        存储方式。 
 组件来源包类型为package和image时需要添加。  | 
     
| 
        auth  | 
      
        String  | 
      
        认证方式,支持iam、none,默认是iam。  | 
     
| 
        repo_auth  | 
      
        String  | 
      
        授权名称,在授权列表获取。  | 
     
| 
        repo_namespace  | 
      
        String  | 
      
        代码仓库命名空间。  | 
     
| 
        repo_ref  | 
      
        String  | 
      
        代码分支或者Tag,默认是master。  | 
     
| 
        repo_type  | 
      
        String  | 
      
        代码仓类型,支持GitHub、BitBucket、GitLab。  | 
     
| 
        web_url  | 
      
        String  | 
      
        代码跳转链接,例如:https://github.com/example/demo.git。  | 
     
| 
        repo_url  | 
      
        String  | 
      
        代码仓url,例如:https://github.com/example/demo.git。  | 
     
| 
        commit_id  | 
      
        String  | 
      
        代码仓库中,commit id是每次提交的唯一标识符,用于识别和引用特定的提交。 长度为8到40个字符,以小写字母或数字开头。  | 
     
| 
        http_username  | 
      
        否  | 
      
        String 在“storage”为“http”时需要填写,支持用户名、密码认证,这里填写用户名。  | 
     
| 
        http_password  | 
      
        否  | 
      
        String 在“storage”为“http”时需要填写,支持用户名、密码认证,这里填写密码。  | 
     
| 
        http_command  | 
      
        否  | 
      
        String 在“storage”为“http”时需要填写,这里是用户定义软件包的地址。  | 
     
| 
        http_headers  | 
      
        否  | 
      
        Map<String, String> 在“storage”为“http”时需要填写,支持用户自定义请求头,支持填写一个key,value,例如{"key":"xx","value":"xx""},其中的key和value关键字固定。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        build_cmd  | 
      
        String  | 
      
        编译命令。默认: 
  | 
     
| 
        dockerfile_path  | 
      
        String  | 
      
        dockerfile地址,默认是根目录./。  | 
     
| 
        artifact_namespace  | 
      
        String  | 
      
        构建归档组织,默认cas_{project_id}。  | 
     
| 
        cluster_id  | 
      
        String  | 
      
        指定构建集群的id。  | 
     
| 
        node_label_selector  | 
      
        Map<String, String>  | 
      
        key是标签的键,value是标签的值。  | 
     
| 
        environment_id  | 
      
        String  | 
      
        环境ID。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        component_status  | 
      
        String  | 
      
        组件状态。 
  | 
     
| 
        available_replica  | 
      
        Integer  | 
      
        可用实例。  | 
     
| 
        replica  | 
      
        Integer  | 
      
        总实例。  | 
     
| 
        succeeded_replica  | 
      
        Integer  | 
      
        普通任务工作负载执行成功的实例数。  | 
     
| 
        fail_detail  | 
      
        String  | 
      
        失败原因。 
  | 
     
| 
        last_job_id  | 
      
        String  | 
      
        最后执行任务ID。  | 
     
| 
        create_time  | 
      
        Integer  | 
      
        创建时间。  | 
     
| 
        update_time  | 
      
        Integer  | 
      
        更新时间。  | 
     
| 
        creator  | 
      
        String  | 
      
        创建人。  | 
     
| 
        artifact  | 
      
        Object  | 
      
        组件构建信息,请参考表37。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        key  | 
      
        String  | 
      
        污点键。  | 
     
| 
        operator  | 
      
        String  | 
      
        操作符。 
  | 
     
| 
        value  | 
      
        String  | 
      
        污点值。“operator”为“Equal”时,需要填写污点值。  | 
     
| 
        effect  | 
      
        String  | 
      
        污点策略。 
  | 
     
| 
        toleration_seconds  | 
      
        Integer  | 
      
        容忍时间窗。 当“effect”为“NoExecute”时支持配置。在容忍时间窗内,Pod还会在拥有污点的节点上运行,超出时间后会被驱逐。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        container_name  | 
      
        String  | 
      
        容器名称。  | 
     
| 
        source  | 
      
        Object  | 
      
        代码/软件包来源,请参考表33,多容器模式下仅支持镜像。  | 
     
| 
        limit_cpu  | 
      
        Number  | 
      
        最大CPU限制,单位为Core。  | 
     
| 
        limit_memory  | 
      
        Number  | 
      
        最大内存限制,单位为GiB。  | 
     
| 
        request_cpu  | 
      
        Number  | 
      
        申请CPU资源,单位为Core。  | 
     
| 
        request_memory  | 
      
        Number  | 
      
        申请内存资源,单位为GiB。  | 
     
| 
        envs  | 
      
        Array of objects  | 
      
        环境变量列表,请参考表30。  | 
     
| 
        liveness_probe  | 
      
        Object  | 
      
        容器存活探针,请参考表27。  | 
     
| 
        readiness_probe  | 
      
        Object  | 
      
        容器业务探针,请参考表27。  | 
     
| 
        startup_probe  | 
      
        Object  | 
      
        容器启动探针,请参考表27。  | 
     
| 
        command  | 
      
        Object  | 
      
        启动命令,请参考表14。  | 
     
| 
        post_start  | 
      
        Object  | 
      
        启动后处理,请参考表15。  | 
     
| 
        pre_stop  | 
      
        Object  | 
      
        停止前处理,请参考表15。  | 
     
| 
        logs  | 
      
        Array of objects  | 
      
        日志采集,请参考表23。  | 
     
| 
        storages  | 
      
        Array of objects  | 
      
        存储,请参考表6。  | 
     
| 
        security_context  | 
      
        Object  | 
      
        安全策略,请参考表21。  | 
     
| 
        config_encryption  | 
      
        Object  | 
      
        多容器组件配置加密密钥时需设置,请参考表49。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        type  | 
      
        String  | 
      
        组件升级类型: 
  | 
     
| 
        max_unavailable  | 
      
       
  | 
      
        最大无效实例数。与replica相比,可以有多少个实例失效,也就是删除的比例,默认值是25%。workload_kind为deployment时支持设置。 
  | 
     
| 
        max_surge  | 
      
       
  | 
      
        最大浪涌。与replica相比,可以有多少个实例存在,默认值是25%。仅workload_kind为deployment时支持设置。 
  | 
     
| 
        termination_period_seconds  | 
      
        Integer  | 
      
        缩容时间窗。工作负载停止前命令的执行时间窗,默认值为30秒。  | 
     
| 
        min_ready_seconds  | 
      
        Integer  | 
      
        实例可用最短时间。指定新创建的实例在没有任意容器崩溃情况下的最小就绪时间,只有超出这个时间实例才被视为可用。 默认值为 0。  | 
     
| 
        progress_deadline_seconds  | 
      
        Integer  | 
      
        升级最大时长。指定系统在报告组件升级失败之前等待组件取得进展的秒数。 如果指定,则此字段值需要大于min_ready_seconds取值。  | 
     
| 
        revision_history_limit  | 
      
        Integer  | 
      
        最大保留版本数。用来设定出于回滚目的所要保留的旧实例数量。默认情况下,系统保留10个旧实例。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        storage  | 
      
        String  | 
      
        组件模板包存储方式。 
  | 
     
| 
        url  | 
      
        String  | 
      
        组件模板包地址。 组件模板包存储方式为自定义文件地址时有效。  | 
     
| 
        http_username  | 
      
        String  | 
      
        用户名。 组件模板包存储方式为自定义文件地址且安全认证方式为用户名密码认证时有效。  | 
     
| 
        http_password  | 
      
        String  | 
      
        密码。 组件模板包存储方式为自定义文件地址且安全认证方式为用户名密码认证时有效。  | 
     
| 
        http_headers  | 
      
        Array of objects  | 
      
        请求头,请参考表43。 组件模板包存储方式为自定义文件地址且安全认证方式为自定义Header认证时有效。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        template  | 
      
        Map<String, String>  | 
      
        模板包文件信息。  | 
     
| 
        input_values  | 
      
        Map<String, String>  | 
      
        模板包输入信息。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        configs  | 
      
        Array of objects  | 
      
        模板包统一配置信息,请参考表 configs。  | 
     
| 
        k8s_resources  | 
      
        Array of objects  | 
      
        模板包K8s资源信息。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        kind  | 
      
        String  | 
      
        资源类型,固定为:ServiceStageConfig。  | 
     
| 
        spec  | 
      
        Object  | 
      
        统一配置参数,请参考表47。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        name  | 
      
        String  | 
      
        统一配置名称,格式为: 
  | 
     
| 
        description  | 
      
        String  | 
      
        统一配置描述。  | 
     
| 
        sensitive  | 
      
        Boolean  | 
      
        是否加密。  | 
     
| 
        content  | 
      
        String  | 
      
        统一配置内容。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        enable  | 
      
        Boolean  | 
      
        是否开启LTS自动配置。  | 
     
| 
        lts_log_path  | 
      
        Array of string  | 
      
        接入配置日志路径。  | 
     
| 
        lts_log_group_name  | 
      
        String  | 
      
        日志组名称。  | 
     
| 
        lts_log_stream_name  | 
      
        String  | 
      
        日志流名称。  | 
     
| 
        lts_host_group_name  | 
      
        String  | 
      
        主机组名称。  | 
     
| 
        lts_access_config_name  | 
      
        String  | 
      
        接入配置名称。  | 
     
| 
        lts_log_group_id  | 
      
        String  | 
      
        日志组ID。  | 
     
| 
        lts_log_stream_id  | 
      
        String  | 
      
        日志流ID。  | 
     
| 
        lts_host_group_id  | 
      
        String  | 
      
        主机组ID。  | 
     
| 
        lts_access_config_id  | 
      
        String  | 
      
        接入配置ID。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        parallelism  | 
      
        Integer  | 
      
        并行数。  | 
     
| 
        active_deadline_seconds  | 
      
        Integer  | 
      
        超时时间(秒)。  | 
     
| 
        completion_mode  | 
      
        String  | 
      
        完成模式 
  | 
     
| 
        suspend  | 
      
        Boolean  | 
      
        是否挂起任务。 默认任务创建后被立即执行。 选择挂起任务后,任务创建后处于挂起状态;将其关闭后,任务继续执行。  | 
     
请求示例
无
响应示例
{
    "name": "test-component",
    "description": "",
    "labels": [],
    "runtime_stack": {
        "type": "Java",
        "name": "OpenJDK8",
        "deploy_mode": "virtualmachine",
        "version": "1.1.1"
    },
    "id": "b8702b0f-94d3-4822-98a1-56815632a0a0",
    "source": {
        "kind": "package",
        "url": "obs://bucket0001/weather-1.0.0.jar",
        "storage": "obs"
    },
    "environment_id": "4d084044-0b80-4641-963c-b9c9f4092a4f",
    "application_id": "fc092465-a5fb-4a52-bc65-b735f18366d8",
    "replica": 1,
    "version": "2023.0323.15181",
    "envs": [],
     "tomcat_opts": {
        "server_xml": "",
        "http_port": 0,
        "context_path": null
    },
    "refer_resources": [
        {
            "id": "Default",
            "type": "ecs",
            "parameters": {
                "hosts": [
                    "67835bb3-1235-4cc9-be71-becbb2b4ca0d"
                ]
            }
        }
    ],
    "status": {
        "component_status": "RUNNING",
        "available_replica": 1,
        "replica": 1,
        "fail_detail": null,
        "last_job_id": "JOB1c8e20ec-1b30-4ee4-9a36-35a18b5e8b7e",
        "creator": null,
        "create_time": 1679556221933,
        "update_time": 1679579448500,
    },
    "workload_kind": "deployment"
}
 状态码
| 
        状态码  | 
      
        描述  | 
     
|---|---|
| 
        200  | 
      
        操作成功  | 
     
| 
        400  | 
      
        错误的请求  | 
     
| 
        404  | 
      
        请求对象不存在  | 
     
| 
        500  | 
      
        内部错误  | 
     
错误码
请参考ServiceStage错误码。