Description
Obtains the cluster information.
Request syntax
GET /clusters/{Id}
Attribute description
Attribute |
Type |
Required |
Description |
Id |
String |
Yes |
Cluster ID. |
Response
Success
The 200 status code and the following cluster status information are returned:
{
"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
}
}
Attribute description
Attribute |
Type |
Description |
Name |
String |
Cluster name. |
Id |
String |
Cluster ID, which is automatically generated. |
Description |
String |
Description of the cluster. |
OwnerId |
int |
Owner ID. |
CreationTime |
String |
Cluster creation time. |
State |
String |
Cluster state.Optional values include Active and Deleting. |
ImageId |
String |
Image ID. |
Notification |
object |
Notification message configuration. You can specify a message event Notification. |
Configs |
object |
Cluster configurations, such as the disk configuration of the instance. It is described by ConfigInfo. |
Groups |
Object |
Information about instance groups in the cluster. Information about each instance group is described by GroupInfo. |
OperationLogs |
Array |
Operation log. |
Metrics |
Object |
Cluster metrics data. It is described by ClusterMetrics. |
Error codes
Error code |
Error message |
Status code |
Syntax |
InvalidResource.NotFound |
Specified resource is not found. |
404 |
The user requested resource does not exist. |