All Products
Search
Document Center

GetCluster

Last Updated: May 14, 2018

Description

Obtains the cluster information.

Request syntax

  1. 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:

  1. {
  2. "Name": "clusterName1",
  3. "Id": "cls-6kir9pdp3lg6220g418002",
  4. "OwnerId": 123,
  5. "Description": "demo",
  6. "CreationTime": "2016-10-31T06:55:33.921897Z",
  7. "State": "Active",
  8. "ImageId": "img-ubuntu",
  9. "Notification": {
  10. "Topic": {
  11. "Name": "test-topic",
  12. "Endpoint": "http://[UserId].mns.[Region].aliyuncs.com/",
  13. "Events": [
  14. "OnClusterDeleted",
  15. "OnInstanceCreated",
  16. "OnInstanceActive"
  17. ]
  18. }
  19. },
  20. "Configs": {
  21. "Disks": {
  22. "SystemDisk": {
  23. "Type": "cloud",
  24. "Size": 500
  25. },
  26. "DataDisk": {
  27. "Type": "cloud",
  28. "Size": 500,
  29. "MountPoint": "/path/to/mount"
  30. }
  31. },
  32. "Mounts": {
  33. "Entries": [
  34. {
  35. "Destination": "/home/admin/mount-dest",
  36. "Source": "oss://your-bucket/mount-source",
  37. "WriteSupport": true
  38. }
  39. ],
  40. "Locale": "GBK",
  41. "Lock": false,
  42. "NAS": {
  43. "AccessGroup": [
  44. "group1",
  45. "group2"
  46. ],
  47. "FileSystem": [
  48. "filesystem1",
  49. "filesystem2"
  50. ]
  51. },
  52. "OSS": {
  53. "AccessKeyId": "",
  54. "AccessKeySecret": "",
  55. "AccessSecurityToken": ""
  56. }
  57. },
  58. "Networks": {
  59. "Classic": {
  60. "AllowIpAddress": [],
  61. "AllowIpAddressEgress": [],
  62. "AllowSecurityGroup": [],
  63. "AllowSecurityGroupEgress": []
  64. },
  65. "VPC": {
  66. "CidrBlock": "10.0.0.0/8",
  67. }
  68. }
  69. },
  70. "Groups": {
  71. "group1": {
  72. "DesiredVMCount": 3,
  73. "ActualVMCount": 2,
  74. "InstanceType": "bcs.a2.large",
  75. "ResourceType": "OnDemand"
  76. }
  77. },
  78. "OperationLogs": ["[2016-10-31T06:55:33.921897Z][group]Creating instance group successfully","[2016-10-31T06:55:33.941897Z]Creating cluster successfully"],
  79. "Metrics": {
  80. "RunningCount": 1,
  81. "StartingCount": 0,
  82. "StoppingCount": 0,
  83. "StoppedCount": 0
  84. }
  85. }

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.