描述
获取集群信息(GetCluster)。
请求语法
GET /clusters/{Id}
属性说明
| 属性名称 |
类型 |
是否必需 |
描述 |
| Id |
String |
是 |
集群标示符。 |
返回信息
成功
返回200状态码以及Cluster的状态信息,如下。
{ "Name": "clusterName1", "Id": "cls-6kir9pdp3lg6220g418002", "OwnerId": 123, "Description": "demo", "CreationTime": "2016-10-31T06:55:33.921897Z", "State": "Active", "ImageId": "img-ubuntu", "Notification": { "Topic": { "Name": "test-topic", "Endpoint": "http://[UserId].mns.[Region].aliyuncs.com/", "Events": [ "OnClusterDeleted", "OnInstanceCreated", "OnInstanceActive" ] } }, "Configs": { "Disks": { "SystemDisk": { "Type": "cloud", "Size": 500 }, "DataDisk": { "Type": "cloud", "Size": 500, "MountPoint": "/path/to/mount" } }, "Mounts": { "Entries": [ { "Destination": "/home/admin/mount-dest", "Source": "oss://your-bucket/mount-source", "WriteSupport": true } ], "Locale": "GBK", "Lock": false, "NAS": { "AccessGroup": [ "group1", "group2" ], "FileSystem": [ "filesystem1", "filesystem2" ] }, "OSS": { "AccessKeyId": "", "AccessKeySecret": "", "AccessSecurityToken": "" } }, "Networks": { "Classic": { "AllowIpAddress": [], "AllowIpAddressEgress": [], "AllowSecurityGroup": [], "AllowSecurityGroupEgress": [] }, "VPC": { "CidrBlock": "10.0.0.0/8", } } }, "Groups": { "group1": { "DesiredVMCount": 3, "ActualVMCount": 2, "InstanceType": "bcs.a2.large", "ResourceType": "OnDemand" } }, "OperationLogs": ["[2016-10-31T06:55:33.921897Z][group]Creating instance group successfully","[2016-10-31T06:55:33.941897Z]Creating cluster successfully"], "Metrics": { "RunningCount": 1, "StartingCount": 0, "StoppingCount": 0, "StoppedCount": 0 }}
属性说明
| 属性名称 |
类型 |
描述 |
| Name |
string |
集群名称。 |
| Id |
string |
集群标识符,自动生成。 |
| Description |
string |
集群的描述信息。 |
| OwnerId |
int |
拥有者ID。 |
| CreationTime |
string |
集群创建时间。 |
| State |
string |
集群状态。仅支持”Active”和”Deleting”。 |
| ImageId |
string |
镜像标识符。 |
| Notification |
object |
消息通知配置,用户指定消息事件Notification。 |
| Configs |
object |
集群的一些配置信息,比如实例的磁盘配置,由ConfigInfo描述。 |
| Groups |
object |
集群的实例组信息,每个实例组的信息由GroupInfo描述。 |
| OperationLogs |
array |
操作日志。 |
| Metrics |
object |
集群Metric数据,由ClusterMetrics描述。 |
错误码
| 错误码 |
错误信息 |
状态码 |
语义 |
| InvalidResource.NotFound |
Specified resource is not found. |
404 |
用户请求的资源不存在。 |