Instance Group Operation Interface
Query Instance Group Lists
Interface Description
Query the instance group information on a specified cluster.
Privileges Description
The request is initiated with legal AccessKeyID and SecretAccessKey, and see the Authentication for more information.
Notes
If the request contains no user verification information (i.e., anonymous access), the 403 Forbidden
is returned with the error message AccessDenied.
Request Structure
GET /v{version}/cluster/{clusterId}/instanceGroup HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: {utc-date-string}
host: bmr.bj.baidubce.com
connection: keep-alive
accept: */*
content-type: application/json
authorization: {bce-authorization-string}
Request Header Field
There are no other special header fields except the common header field.
Request Parameter
Parameter Name | Parameter Type | Required | Parameter Position | Parameter Description |
---|---|---|---|---|
version | String | Yes | URI parameter | API version number, and the current number is 1 |
clusterId | String | Yes | URI parameter | Specified cluster ID |
Response Header Field
There are no other special header fields except the common header field.
Response Parameter
Parameter Name | Parameter Type | Parameter Description |
---|---|---|
instanceGroups | List<InstanceGroup> | Returned instance group list |
Request Example
GET /v1/cluster/0ce4f730-4af2-4f37-8fa2-b14f2f44e50e/instanceGroup HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2015-03-24T13:02:00Z
host: bmr.bj.baidubce.com
connection: keep-alive
accept: */*
content-type: application/json
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2015-03-24T13:02:00Z/1800/host;x-bce-date/994014d96b0eb26578e039fa053a4f9003425da4bfedf33f4790882fb4c54903
Return Example
HTTP/1.1 200 OK
Transfer-Encoding: chunked
x-bce-request-id: 73c4e74c-3101-4a00-bf44-fe246959c05e
Cache-Control: no-cache
Server: BWS
Date: Tue, 24 Mar 2015 13:02:01 GMT
Content-Type: application/json;charset=UTF-8
{
"instanceGroups":[
{
"id":"4e6ac637-5801-40c1-7d9b-a8543224fd5e",
"instanceType":"bmr.g1.xlarge",
"name":"Master",
"requestedInstanceCount":1,
"type":"Master"
},
{
"id":"69610acc-f0b4-4798-440f-2c95c3113fd4",
"instanceType":"bmr.g1.xlarge",
"name":"Core",
"requestedInstanceCount":3,
"type":"Core"
},
{
"id":"93ea4b05-b2a4-4f8e-74d0-75d9f2dd8e55",
"instanceType":"bmr.g1.xlarge",
"name":"Task",
"requestedInstanceCount":0,
"type":"Task"
}
]
}
Modify Instance Group Configurations
Interface Description
Modify the instance group configuration of the specified cluster.
Privileges Description
The request is initiated with legal AccessKeyID and SecretAccessKey, and see the Authentication for more information.
Notes
If the request contains no user verification information (i.e., anonymous access), the 403 Forbidden
is returned with the error message AccessDenied.
Request Structure
PUT /v{version}/cluster/{clusterId}?/instanceGroup&clientToken={clientToken} HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: {utc-date-string}
host: bmr.bj.baidubce.com
connection: keep-alive
accept: */*
content-type: application/json
authorization: {bce-authorization-string}
{
"instanceGroups": [
{
"id": "cefb0a10-6028-467b-8dd5-d71d3cf74fcb",
"instanceCount": 4
},
{
"id": "0575111f-a702-434c-b463-8991b5fb4552",
"instanceCount": 2
}
]
}
Request Header Field
There are no other special header fields except the common header field.
Request Parameter
Parameter Name | Parameter Type | Required | Parameter Position | Parameter Description |
---|---|---|---|---|
version | String | Yes | URI parameter | API version number, and the current number is 1 |
clusterId | String | Yes | URI parameter | Cluster ID to modify, only for the cluster in the status of RUNNING or WAITING |
clientToken | String | No | Query parameter | Idempotent Token is an ASCII character with a length not exceeding 64 bits. |
instanceGroups | List<ModifyInstanceGroupConfig> | Yes | RequestBody parameter | Instance group configuration to modify, and instance groups needing no modification are omitted |
Response Header Field
There are no other special header fields except the common header field.
Response Parameter
No parameter
Request Example
PUT /v1/cluster/f5fa683d-4cf4-46b6-b5ab-bb2c0340c970/instanceGroup&clientToken=bf31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2017-03-13T13:02:00Z
host: bmr.bj.baidubce.com
connection: keep-alive
accept: */*
content-type: application/json
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2017-03-13T13:02:00Z/1800/host;x-bce-date/994014d96b0eb26578e039fa053a4f9003425da4bfedf33f4790882fb4c54903
{
"instanceGroups": [
{
"id": "cefb0a10-6028-467b-8dd5-d71d3cf74fcb",
"instanceCount": 4
},
{
"id": "0575111f-a702-434c-b463-8991b5fb4552",
"instanceCount": 2
}
]
}
Return Example
HTTP/1.1 204 NO_CONTENT
Transfer-Encoding: chunked
x-bce-request-id: 73c4e74c-3101-4a00-bf44-fe246959c05e
Cache-Control: no-cache
Server: BWS
Date: Mon, 13 Mar 2017 13:02:01 GMT
Content-Type: application/json;charset=UTF-8