GetHostAllocatorStrategies
API Request
URLs
GET zstack/v1/hosts/allocators/strategiesHeaders
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth f8e76d7a6ec0461cab685e6bd9d724d2" \
-X GET http://localhost:8080/zstack/v1/hosts/allocators/strategiesRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| systemTags | List | query | Optional. The system tags. | 0.6 | |
| userTags | List | query | Optional. The user tags. | 0.6 |
API Response
Sample
Response
{
"hostAllocatorStrategies": [
"b39183b36b8e4cb386bd7bb45c7c1997",
"e01d613c77a44b65b6bef75b4ef2accb"
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| strategies | List | The strategies. | 0.6 |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
| description | String | The brief description of the error. | 0.6 |
| details | String | The details about the error. | 0.6 |
| elaboration | String | The reserved field. Default value: null. | 0.6 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
SDK Sample
Java
SDK
GetHostAllocatorStrategiesAction action = new GetHostAllocatorStrategiesAction();
action.sessionId = "c10fb9fbab4744ecae6686b4193423e8";
GetHostAllocatorStrategiesAction.Result res = action.call();Python
SDK
GetHostAllocatorStrategiesAction action = GetHostAllocatorStrategiesAction()
action.sessionId = "caa6b3db2d5b42f79b44566b10763973"
GetHostAllocatorStrategiesAction.Result res = action.call()