应用管理与运维平台 SERVICESTAGE-获取应用所有组件:响应消息

时间:2024-09-14 16:28:45

响应消息

表4 响应参数

参数

参数类型

描述

count

Integer

组件总数。

components

Array of objects

组件参数,请参考表5

表5 components

参数

参数类型

描述

id

String

组件ID。

name

String

组件名称。

labels

Array of objects

标签。容器部署方式部署的组件可通过标签查询对应工作负载;虚机部署方式部署的组件可配置对应的微服务名称的标签来使用优雅上下线功能,请参考表10

status

Object

组件状态,请参考表8

runtime_stack

Object

技术栈,请参考表7

application_name

String

应用名称。

application_id

String

应用ID。

environment_name

String

环境名称。

environment_id

String

环境ID。

version

String

组件版本号。

source

Object

代码/软件包来源,请参考表6

creator

String

组件创建人。

platform_type

String

组件部署类型。

external_accesses

Array of objects

外部访问,请参考表11

表6 source

参数

参数类型

描述

kind

String

组件来源类型。

  • code,源码。
  • package,软件包。
  • image,镜像包。

version

String

版本号。

url

String

包地址,类型为package和image时需要添加。

storage

String

存储方式,支持镜像仓库swr、软件仓库swr、软件开发生产线codearts和对象存储obs,类型为package和image时需要添加。

auth

String

认证方式,支持iam、none,默认是iam。

repo_auth

String

授权名称,在授权列表获取。

repo_namespace

String

代码仓库命名空间。

repo_ref

String

代码分支或者Tag,默认是master。

repo_type

String

代码仓类型,支持CodeArts、Gitee、GitHub、BitBucket、GitLab。

web_url

String

代码跳转链接,例如:https://github.com/example/demo.git。

repo_url

String

代码仓url,例如:https://github.com/example/demo.git。

表7 runtime_stack

参数

参数类型

描述

name

String

技术栈名称,例如:OpenJDK8。

type

String

技术栈类型,例如:Java。

version

String

技术栈版本,例如:1.1.4。

deploy_mode

String

部署模式。

  • 容器部署,container。
  • 虚机部署,virtualmachine。
表8 status

参数

参数类型

描述

component_status

String

组件状态。

  • INITIALIZING,初始化。
  • UPGRADING,升级中。
  • FAILED,失败。
  • RUNNING,运行中。
  • DOWN,下线。
  • DELETING,删除中。
  • DELETED,已删除。
  • RESERVED,保留。
  • STARTING,启动中。
  • STOPPING,停止中。
  • STOPPED,停止。
  • RESTARTING,重启中。
  • PENDING,未就绪。
  • UNKNOWN,未知。
  • PARTIALLY_FAILED,部分失败。

available_replica

Integer

可用实例。

replica

Integer

总实例。

fail_detail

String

失败原因。

  • cluster_deleted,集群被删除。
  • cluster_unavailable,集群不可用。
  • cluster_inaccessible,集群无法访问。
  • namespace_deleted,命名空间被删除。
  • namespace_unavailable,命名空间不可用。
  • namespace_inaccessible,命名空间无法访问。
  • resource_deleted,资源已删除。
  • create_failed,创建组件失败。
  • delete_failed,删除组件失败。

last_job_id

String

最后执行任务ID。

create_time

Integer

创建时间。

update_time

Integer

更新时间。

creator

String

创建人。

artifact

Object

组件构建信息,请参考表9

表9 artifact

参数

参数类型

描述

type

String

组件来源类型。

  • 虚拟机部署支持软件包package。
  • 容器部署支持软件包package、镜像包image。

url

String

软件包/镜像地址。

表10 labels

参数

参数类型

描述

key

String

标签名称。

value

String

标签值。

表11 external_accesses

参数

参数类型

描述

protocol

String

外部访问类型,取值范围为:http、https。

address

String

外部访问地址。

forward_port

Integer

外部访问端口。

support.huaweicloud.com/api-servicestage/servicestage_06_0077.html