获取Container实例-DescribeContainerInstance
获取Container实例
Request Parameters
Parameter name | Type | Description | Required |
Region | string | 地域。 参见 地域和可用区列表 | Yes |
Zone | string | 可用区。参见 可用区列表 | No |
ProjectId | string | 项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口 | No |
NodeId | string | 容器所属节点ID | No |
ClusterId | string | 容器所属资源池ID | No |
ContainerIds.n | string | 容器ID | No |
Offset | int | 偏移量,默认为0 | No |
Limit | int | 总量限制,默认20,最大值10000 | No |
Response Elements
Parameter name | Type | Description | Required |
RetCode | int | 操作返回码 | Yes |
Action | string | 操作名称 | Yes |
TotalCount | int | 总数 | Yes |
ContainerSet | array | 容器列表 | No |
ContainerSet
Parameter name | Type | Description | Required |
ContainerId | string | 容器ID | No |
ClusterId | string | 集群ID | No |
NodeId | string | 节点ID | No |
Name | string | 容器名 | No |
Image | string | 容器镜像 | No |
Zone | string | 可用区 | No |
CPU | float | CPU个数 | No |
Memory | int | 内存容量,MB | No |
Cmd | string | 容器启动命令 | No |
State | string | 状态 | No |
IPSet | array | IP | No |
CreateTime | int | Unix时间戳 | No |
Volume | string | 容器内挂载的目录 | No |
Enviroment | array | 环境变量 | No |
EnviromentSet
Parameter name | Type | Description | Required |
Key | string | key:val形式 | No |
IPSet
Parameter name | Type | Description | Required |
Type | string | IP类型 国际:International, BGP:BGP, 内网:Private | No |
IPId | string | IP资源ID (只在当前IP为外网IP时返回) | No |
IP | string | IP地址 | No |
Bandwidth | int | IP对应的带宽, 单位:Mb (只在当前IP为外网IP时返回) | No |
VPCId | string | VPCId | No |
SubnetId | string | 子网ID | No |
Request Example
https://api.ucloud.cn/?Action=DescribeContainerInstance &Region=cn-bj2 &Zone=cn-bj2-02 &ProjectId=org-xxx &NodeId=dnode-xxx &ClusterId=cluster-xxx &Offset=0 &Limit=100
Response Example
{ "RetCode": 0, "Action": "DescribeContainerInstanceResponse", "TotalCount": 2, "ContainerSet": [ { "ClusterId": "cluster-xxx", "ClusterName": "cluster2", "Cmd": "", "ComputerDetails": { "res_id": "dnode-xxx", "all_cpus": 4, "all_mem": 8192, "vpc_id": "uvnet-xxx", "subnet_id": "subnet-xxx" }, "CreateTime": 1529986046, "Image": "uhub.service.ucloud.cn/ucloud/centos6-ssh:latest", "Name": "service22-pod", "NodeId": "dnode-xxx", "Parameters": { "log-opt": [ "max-file=2", "max-size=10M" ] }, "PortMap": "", "RegionId": 1000001, "SvcName": "service22", "TaskId": "docker-xxx", "Volume": "", "Weight": 100, "ContainerType": "pod", "CPU": 0, "Memory": 0, "Enviroment": [ { "TZ": "Asia/Shanghai" } ], "IPSet": [ { "Type": "Private", "IP": "10.10.xxx.xxx" } ], "Zone": "cn-bj2-02", "ContainerId": "docker-xxx", "State": "RUNNING" }, { "ClusterId": "cluster-xxx", "ClusterName": "cluster2", "Cmd": "", "ComputerDetails": { "res_id": "dnode-xxx", "all_cpus": 4, "all_mem": 8192, "vpc_id": "uvnet-xxx", "subnet_id": "subnet-xxx" }, "CreateTime": 1529985617, "Image": "uhub.service.ucloud.cn/ucloud/centos6-ssh:latest", "Name": "Container", "NodeId": "dnode-xxx", "Parameters": { "log-opt": [ "max-file=2", "max-size=10M" ] }, "PortMap": "", "RegionId": 1000001, "SvcName": "", "TaskId": "docker-xxx", "Volume": ":/data", "Weight": 0, "ContainerType": "container", "CPU": 0, "Memory": 0, "Enviroment": [ { "TZ": "Asia/Shanghai" } ], "IPSet": [ { "Type": "Private", "IP": "10.10.xxx.xxx" } ], "Zone": "cn-bj2-02", "ContainerId": "docker-xxx", "State": "RUNNING" } ] }