当前位置:主页 > 查看内容

获取集群信息 - 批量计算

发布时间:2021-09-20 00:00| 位朋友查看

简介:GetCluster 描述 获取集群信息。 请求语法 请求行: GET / clusters /{ Id } HTTP / 1.1 请求方法为 GET,请求资源为 clusters,请求参数为: 属性名称 类型 是否必须 描述 Id String 是 集群标识符。 无请求数据。 返回信息 成功 状态行: HTTP / 1.1 201 O……

GetCluster

描述

获取集群信息。

请求语法

请求行:

  1. GET /clusters/{Id} HTTP/1.1

请求方法为 GET,请求资源为 clusters,请求参数为:

属性名称 类型 是否必须 描述
Id String 集群标识符。

无请求数据。

返回信息

成功

状态行:

  1. HTTP/1.1 201 OK

响应数据:

返回的数据为 JSON 格式串。

  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. }

属性说明:

属性名称 类型 是否必须 描述
Name string 集群名称。
Id string 集群标识符,自动生成。
Description string 集群的描述信息。
OwnerId int 拥有者ID。
CreationTime string 集群创建时间。
State string 集群状态。仅支持”Active”和”Deleting”。
ImageId string 镜像标识符。
Notification object(Notification) 消息通知配置,用户指定消息事件Notification
Configs object(ConfigInfo) 集群的一些配置信息,比如实例的磁盘配置,由ConfigInfo描述。
Groups map<string, object(GroupInfo)> 集群的实例组信息,每个实例组的信息由GroupInfo描述。
OperationLogs array[string] 操作日志。
Metrics object(ClusterMetrics) 集群Metric数据,由ClusterMetrics描述。

错误

状态码 错误码 错误信息 语义
404 InvalidResource.NotFound Specified resource is not found. 用户请求的资源不存在。

本站部分内容转载于网络,版权归原作者所有,转载之目的在于传播更多优秀技术内容,如有侵权请联系QQ/微信:153890879删除,谢谢!

推荐图文


随机推荐