Document navigation

Settings Operations

Global Settings Operations

QueryGlobalConfig

API Request

URLs

GET zstack/v1/global-configurations

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 036d9a68cd8243e99e8d740eaf8b4baf" \
-X GET http://localhost:8080/zstack/v1/global-configurations

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryGlobalConfig, and pressing the Tab key.

API Response

Sample Response

{
  "inventories": [
    {
      "name": "reservedCapacity",
      "category": "backupStorage",
      "description": "Reserved capcacity on every backup storage",
      "defaultValue": "1G",
      "value": "2G"
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 0.6
inventories List See inventories. 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

#inventories

Name Type Description Starting Version
name String The resource name. 0.6
category String The category. 0.6
description String The detailed description of the resource. 0.6
defaultValue String The default value. 0.6
value String The field value. 0.6

SDK Sample

Java SDK

QueryGlobalConfigAction action = new QueryGlobalConfigAction();
action.conditions = asList();
action.sessionId = "8509eaa6301b4935a4b100a05f1fe2ba";
QueryGlobalConfigAction.Result res = action.call();

Python SDK

action = QueryGlobalConfigAction()
action.conditions = []
action.sessionId = "e085fdf6aa354291b71ae8dc5fa880fe"
res = action.call()

UpdateGlobalConfig

API Request

URLs

PUT zstack/v1/global-configurations/{category}/{name}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
"updateGlobalConfig": {
"value": "90"
  },
"systemTags": [],
"userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateGlobalConfig":{"value":"90"}}' \
http://localhost:8080/zstack/v1/global-configurations/quota/scheduler.num/actions

Request Parameters

Name Type Location Description Optional Value Starting Version
category String url The category. 0.6
name String url The resource name. 0.6
value String body (contained in the updateGlobalConfig structure) Optional. The value. 0.6
systemTags List body Optional. The system tags. 0.6
userTags List body Optional. The user tags. 0.6

API Response

Sample Response

{
  "inventory": {
    "name": "scheduler.num",
    "category": "quota",
    "description": "default quota for scheduler.num",
    "defaultValue": "80",
    "value": "90"
  }
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 0.6
inventory GlobalConfigInventory See inventory. 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

#inventory

Name Type Description Starting Version
name String The resource name. 0.6
category String The category. 0.6
description String The detailed description of the resource. 0.6
defaultValue String The default value. 0.6
value String The field value. 0.6

SDK Sample

Java SDK

UpdateGlobalConfigAction action = new UpdateGlobalConfigAction();
action.category = "quota";
action.name = "scheduler.num";
action.value = "90";
action.sessionId = "84a1a9ed2d54449db13e01f7d6face7e";
UpdateGlobalConfigAction.Result res = action.call();

Python SDK

action = UpdateGlobalConfigAction()
action.category = "quota"
action.name = "scheduler.num"
action.value = "90"
action.sessionId = "b077cfa8599a4ff1ac4fd7ba67b20a82"
res = action.call()

ResetGlobalConfig

API Request

URLs

PUT zstack/v1/global-configurations/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "resetGlobalConfig": {},
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"resetGlobalConfig":{}}' http://localhost:8080/zstack/v1/global-configurations/actions

Request Parameters

Name Type Location Description Optional Value Starting Version
systemTags List body Optional. The system tags. 3.1.0
userTags List body Optional. The user tags. 3.1.0

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,

{
    "error": {
        "code": "SYS.1001",
        "description": "A message or a operation timeout",
        "details": "Create VM on KVM timeout after 300s"
    }
}

SDK Sample

Java SDK

ResetGlobalConfigAction action = new ResetGlobalConfigAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ResetGlobalConfigAction.Result res = action.call();

Python SDK

action = ResetGlobalConfigAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

Advanced Settings Operations

GetResourceConfig

API Request

URLs

GET zstack/v1/resource-configurations/{resourceUuid}/{category}/{name}

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/resource-configurations/77663dd5ff84460bbf1817aa3c59d125/host/cpu.overProvisioning.ratio

Request Parameters

Name Type Location Description Optional Value Starting Version
category String url The setting category. 3.4.0
name String url The setting name. 3.4.0
resourceUuid String url The resource UUID. 3.4.0
systemTags List query Optional. The system tags. 3.4.0
userTags List query Optional. The user tags. 3.4.0

API Response

Sample Response

{
  "value": "5",
  "effectiveConfigs": [
    {
      "uuid": "dae9aeb6d74e4f44823f2e0c4f1cc79f",
      "resourceUuid": "46597de31eac41539c4e6eda52885769",
      "resourceType": "HostVO",
      "name": "cpu.overProvisioning.ratio",
      "category": "host",
      "value": "5",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    },
    {
      "uuid": "5c3c94a73d7b4a95a1818241f2e427ae",
      "resourceUuid": "371519310f344695854de27bb9743121",
      "resourceType": "ClusterVO",
      "name": "cpu.overProvisioning.ratio",
      "category": "host",
      "value": "10",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
Name Type Description Starting Version
value String The setting value. 3.4.0
success boolean Whether the operation succeeded. 3.4.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.4.0
effectiveConfigs List The setting list that takes effect. Settings are ordered from high to low priorities. For more information, see effectiveConfigs. 3.4.0
error ErrorCode See error. 3.4.0

#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. 3.4.0
description String The brief description of the error. 3.4.0
details String The details about the error. 3.4.0
elaboration String The reserved field. Default value: null. 3.4.0
opaque LinkedHashMap The reserved field. Default value: null. 3.4.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.4.0

#effectiveConfigs

Name Type Description Starting Version
uuid String The resource UUID. 3.4.0
resourceUuid String The resource UUID corresponded by the setting. 3.4.0
resourceType String The resource type corresponded by the setting. 3.4.0
name String The setting name. 3.4.0
description String The detailed description of the setting. 3.4.0
category String The setting category. 3.4.0
value String The setting value. 3.4.0
createDate Timestamp The creation date. 3.4.0
lastOpDate Timestamp The last operation date. 3.4.0

#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. 3.4.0
description String The brief description of the error. 3.4.0
details String The details about the error. 3.4.0
elaboration String The reserved field. Default value: null. 3.4.0
opaque LinkedHashMap The reserved field. Default value: null. 3.4.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.4.0

SDK Sample

Java SDK

GetResourceConfigAction action = new GetResourceConfigAction();
action.category = "host";
action.name = "cpu.overProvisioning.ratio";
action.resourceUuid = "70fdcc564f564c29af98e48e78be56e4";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetResourceConfigAction.Result res = action.call();

Python SDK

action = GetResourceConfigAction()
action.category = "host"
action.name = "cpu.overProvisioning.ratio"
action.resourceUuid = "b1ea1d424bf04a50b15b33bcd0f8a80d"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

GetResourceBindableConfig

API Request

URLs

GET zstack/v1/resource-configurations/bindable
GET zstack/v1/resource-configurations/bindable/{category}

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/resource-configurations/bindable?category=host
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/resource-configurations/bindable/host?category=host

Request Parameters

Name Type Location Description Optional Value Starting Version
category String query Optional. The setting category. 3.4.0
systemTags List query Optional. The system tags. 3.4.0
userTags List query Optional. The user tags. 3.4.0

API Response

Sample Response

{
  "bindableConfigs": [
    {
      "name": "cpu.overProvisioning.ratio",
      "category": "host",
      "bindResourceTypes": [
        "HostVO",
        "ClusterVO",
        "ZoneVO"
      ]
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.4.0
bindableConfigs List See bindableConfigs. 3.4.0

#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. 3.4.0
description String The brief description of the error. 3.4.0
details String The details about the error. 3.4.0
elaboration String The reserved field. Default value: null. 3.4.0
opaque LinkedHashMap The reserved field. Default value: null. 3.4.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.4.0

#bindableConfigs

Name Type Description Starting Version
name String The setting name. 3.4.0
category String The setting category. 3.4.0
description String The detailed description of the setting. 3.4.0
bindResourceTypes List The resource types that can be bound by the setting. 3.4.0

SDK Sample

Java SDK

GetResourceBindableConfigAction action = new GetResourceBindableConfigAction();
action.category = "host";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetResourceBindableConfigAction.Result res = action.call();

Python SDK

action = GetResourceBindableConfigAction()
action.category = "host"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

DeleteResourceConfig

API Request

URLs

DELETE zstack/v1/resource-configurations/{category}/{name}/{resourceUuid}

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/resource-configurations/host/cpu.overProvisioning.ratio/02bcf0b045e247e59bfd51630064443f

Request Parameters

Name Type Location Description Optional Value Starting Version
category String url The setting category. 3.4.0
name String url The setting name. 3.4.0
resourceUuid String url The resource UUID. 3.4.0
deleteMode String body Optional. The delete mode. 3.4.0
systemTags List body Optional. The system tags. 3.4.0
userTags List body Optional. The user tags. 3.4.0

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,

{
    "error": {
        "code": "SYS.1001",
        "description": "A message or a operation timeout",
        "details": "Create VM on KVM timeout after 300s"
    }
}

SDK Sample

Java SDK

DeleteResourceConfigAction action = new DeleteResourceConfigAction();
action.category = "host";
action.name = "cpu.overProvisioning.ratio";
action.resourceUuid = "763612d48d514b35a7df506cf1a23f57";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteResourceConfigAction.Result res = action.call();

Python SDK

action = DeleteResourceConfigAction()
action.category = "host"
action.name = "cpu.overProvisioning.ratio"
action.resourceUuid = "4ac85edbee2c489ea58e3f26b53182de"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

QueryResourceConfig

API Request

URLs

GET zstack/v1/resource-configurations

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/resource-configurations

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryResourceConfig, and pressing the Tab key.

API Response

Sample Response

{
  "inventories": [
    {
      "uuid": "4944c2599c394bd5be5ccc1099dfdb4b",
      "resourceUuid": "45a511dfef1b474dbef3c1ff88275465",
      "resourceType": "ClusterVO",
      "name": "cpu.overProvisioning.ratio",
      "category": "host",
      "value": "10",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.4.0
inventories List See inventories. 3.4.0

#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. 3.4.0
description String The brief description of the error. 3.4.0
details String The details about the error. 3.4.0
elaboration String The reserved field. Default value: null. 3.4.0
opaque LinkedHashMap The reserved field. Default value: null. 3.4.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.4.0

#inventories

Name Type Description Starting Version
uuid String The resource UUID. 3.4.0
resourceUuid String The resource UUID corresponded by the setting. 3.4.0
resourceType String The resource type corresponded by the setting. 3.4.0
name String The setting name. 3.4.0
description String The detailed description of the setting. 3.4.0
category String The setting category. 3.4.0
value String The setting value. 3.4.0
createDate Timestamp The creation date. 3.4.0
lastOpDate Timestamp The last operation date. 3.4.0

SDK Sample

Java SDK

QueryResourceConfigAction action = new QueryResourceConfigAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryResourceConfigAction.Result res = action.call();

Python SDK

action = QueryResourceConfigAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

UpdateResourceConfig

API Request

URLs

PUT zstack/v1/resource-configurations/{category}/{name}/{resourceUuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateResourceConfig": {
    "value": "10"
  },
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateResourceConfig":{"value":"10"}}' http://localhost:8080/zstack/v1/resource-configurations/host/cpu.overProvisioning.ratio/afd5f67a253b4990b9e8160672357eed/actions

Request Parameters

Name Type Location Description Optional Value Starting Version
category String url The setting category. 3.4.0
name String url The setting name. 3.4.0
resourceUuid String url The resource UUID. 3.4.0
value String body (contained in the updateResourceConfig structure) The setting value. 3.4.0
systemTags List body Optional. The system tags. 3.4.0
userTags List body Optional. The user tags. 3.4.0

API Response

Sample Response

{
  "inventory": {
    "uuid": "ce61962673574ff689e2e6cb6f8cf558",
    "resourceUuid": "435a7c71c82b4b0b971f4674ab346822",
    "resourceType": "ClusterVO",
    "name": "cpu.overProvisioning.ratio",
    "category": "host",
    "value": "10",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM"
  }
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.4.0
inventory ResourceConfigInventory See inventory. 3.4.0

#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. 3.4.0
description String The brief description of the error. 3.4.0
details String The details about the error. 3.4.0
elaboration String The reserved field. Default value: null. 3.4.0
opaque LinkedHashMap The reserved field. Default value: null. 3.4.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.4.0

#inventory

Name Type Description Starting Version
uuid String The resource UUID. 3.4.0
resourceUuid String The resource UUID corresponded by the setting. 3.4.0
resourceType String The resource type corresponded by the setting. 3.4.0
name String The setting name. 3.4.0
description String The detailed description of the setting. 3.4.0
category String The setting category. 3.4.0
value String The setting value. 3.4.0
createDate Timestamp The creation date. 3.4.0
lastOpDate Timestamp The last operation date. 3.4.0

SDK Sample

Java SDK

UpdateResourceConfigAction action = new UpdateResourceConfigAction();
action.category = "host";
action.name = "cpu.overProvisioning.ratio";
action.resourceUuid = "5fa296dff4f04c96b29f38bef93e9e15";
action.value = "10";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateResourceConfigAction.Result res = action.call();

Python SDK

action = UpdateResourceConfigAction()
action.category = "host"
action.name = "cpu.overProvisioning.ratio"
action.resourceUuid = "1e0f389aca364a1f94929bb4f39597b3"
action.value = "10"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

Template Operations

ApplyTemplateConfig

API Request

URLs

PUT zstack/v1/template-configurations/{templateUuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "applyTemplateConfig": {},
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"applyTemplateConfig":{}}' http://localhost:8080/zstack/v1/template-configurations/00000000/actions

Request Parameters

Name Type Location Description Optional Value Starting Version
templateUuid String url The template UUID. 3.6.0
systemTags List body Optional. The system tags. 3.6.0
userTags List body Optional. The user tags. 3.6.0

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,

{
    "error": {
        "code": "SYS.1001",
        "description": "A message or a operation timeout",
        "details": "Create VM on KVM timeout after 300s"
    }
}

SDK Sample

Java SDK

ApplyTemplateConfigAction action = new ApplyTemplateConfigAction();
action.templateUuid = "00000000";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ApplyTemplateConfigAction.Result res = action.call();

Python SDK

action = ApplyTemplateConfigAction()
action.templateUuid = "00000000"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

QueryGlobalConfigTemplate

API Request

URLs

GET zstack/v1/template-configurations/templates
GET zstack/v1/template-configurations/templates/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/template-configurations/templates?

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryGlobalConfigTemplate, and pressing the Tab key.

API Response

Sample Response

{
  "inventories": [
    {
      "uuid": "reservedCapacity",
      "name": "scenes1",
      "type": "System",
      "description": "For scenes1"
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.6.0
inventories List See inventories. 3.6.0

#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. 3.6.0
description String The brief description of the error. 3.6.0
details String The details about the error. 3.6.0
elaboration String The reserved field. Default value: null. 3.6.0
opaque LinkedHashMap The reserved field. Default value: null. 3.6.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.6.0

#inventories

Name Type Description Starting Version
uuid String The resource UUID. 3.6.0
name String The template name. 3.6.0
type String The template type. 3.6.0
description String The detailed description of and the recommended scenario of the template. 3.6.0

SDK Sample

Java SDK

QueryGlobalConfigTemplateAction action = new QueryGlobalConfigTemplateAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryGlobalConfigTemplateAction.Result res = action.call();

Python SDK

action = QueryGlobalConfigTemplateAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

QueryTemplateConfig

API Request

URLs

GET zstack/v1/template-configurations/configs
GET zstack/v1/template-configurations/configs/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/template-configurations/configs?

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryTemplateConfig, and pressing the Tab key.

API Response

Sample Response

{
  "inventories": [
    {
      "templateUuid": "0000111122223333",
      "category": "backupStorage",
      "name": "reservedCapacity",
      "defaultValue": "1G",
      "value": "2G"
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.6.0
inventories List See inventories. 3.6.0

#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. 3.6.0
description String The brief description of the error. 3.6.0
details String The details about the error. 3.6.0
elaboration String The reserved field. Default value: null. 3.6.0
opaque LinkedHashMap The reserved field. Default value: null. 3.6.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.6.0

#inventories

Name Type Description Starting Version
templateUuid String The template UUID. 3.6.0
category String The setting category. 3.6.0
name String The setting name. 3.6.0
defaultValue String The default template value. 3.6.0
value String The template value. 3.6.0

SDK Sample

Java SDK

QueryTemplateConfigAction action = new QueryTemplateConfigAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryTemplateConfigAction.Result res = action.call();

Python SDK

action = QueryTemplateConfigAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

UpdateTemplateConfig

API Request

URLs

PUT zstack/v1/template-configurations/{templateUuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateTemplateConfig": {
    "category": "quota",
    "name": "scheduler.num",
    "value": "90"
  },
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateTemplateConfig":{"category":"quota","name":"scheduler.num","value":"90"}}' http://localhost:8080/zstack/v1/template-configurations/0000/actions

Request Parameters

Name Type Location Description Optional Value Starting Version
templateUuid String url The template UUID. 3.6.0
category String body (contained in the updateTemplateConfig structure) The corresponding global setting category. 3.6.0
name String body (contained in the updateTemplateConfig structure) The corresponding global setting name. 3.6.0
value String body (contained in the updateTemplateConfig structure) The template value. 3.6.0
systemTags List body Optional. The system tags. 3.6.0
userTags List body Optional. The user tags. 3.6.0

API Response

Sample Response

{
  "inventory": {
    "templateUuid": "000011112222",
    "category": "vm",
    "name": "emulateHyperV",
    "defaultValue": "true",
    "value": "true"
  }
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.6.0
inventory TemplateConfigInventory See inventory. 3.6.0

#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. 3.6.0
description String The brief description of the error. 3.6.0
details String The details about the error. 3.6.0
elaboration String The reserved field. Default value: null. 3.6.0
opaque LinkedHashMap The reserved field. Default value: null. 3.6.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.6.0

#inventory

Name Type Description Starting Version
templateUuid String The template UUID. 3.6.0
category String The setting category. 3.6.0
name String The setting name. 3.6.0
defaultValue String The default template value. 3.6.0
value String The template value. 3.6.0

SDK Sample

Java SDK

UpdateTemplateConfigAction action = new UpdateTemplateConfigAction();
action.templateUuid = "0000";
action.category = "quota";
action.name = "scheduler.num";
action.value = "90";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateTemplateConfigAction.Result res = action.call();

Python SDK

action = UpdateTemplateConfigAction()
action.templateUuid = "0000"
action.category = "quota"
action.name = "scheduler.num"
action.value = "90"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

ResetTemplateConfig

API Request

URLs

PUT zstack/v1/template-configurations/{templateUuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "resetTemplateConfig": {},
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"resetTemplateConfig":{}}' http://localhost:8080/zstack/v1/template-configurations/00000000/actions

Request Parameters

Name Type Location Description Optional Value Starting Version
templateUuid String url The template UUID. 3.6.0
systemTags List body Optional. The system tags. 3.6.0
userTags List body Optional. The user tags. 3.6.0

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,

{
    "error": {
        "code": "SYS.1001",
        "description": "A message or a operation timeout",
        "details": "Create VM on KVM timeout after 300s"
    }
}

SDK Sample

Java SDK

ResetTemplateConfigAction action = new ResetTemplateConfigAction();
action.templateUuid = "00000000";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ResetTemplateConfigAction.Result res = action.call();

Python SDK

action = ResetTemplateConfigAction()
action.templateUuid = "00000000"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

RevertTemplateConfig

API Request

URLs

PUT zstack/v1/template-configurations/{templateUuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "resetTemplateConfig": {},
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \-X PUT -d '{"revertTemplateConfig":{}}' http://localhost:8080/zstack/v1/template-configurations/fd5ae067a0b037d2af3a6ec060c4be86/actions

Request Parameters

Name Type Location Description Valid Value Starting Version
templateUuid String url The template UUID. 4.6.21
systemTags List body Optional. The system tags. 4.6.21
userTags List body Optional. The user tags. 4.6.21

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,

{
    "error": {
        "code": "SYS.1001",
        "description": "A message or a operation timeout",
        "details": "Create VM on KVM timeout after 300s"
    }
}

SDK Sample

Java SDK

RevertTemplateConfigAction action = new RevertTemplateConfigAction();
action.templateUuid = "fd5ae067a0b037d2af3a6ec060c4be86";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RevertTemplateConfigAction.Result res = action.call();

Python SDK

action = RevertTemplateConfigAction()
action.templateUuid = "fd5ae067a0b037d2af3a6ec060c4be86"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

HA Policy Operations

UpdateHaStrategyCondition

API Request

URLs

PUT zstack/v1/ha-strategy-condition/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateHaStrategyCondition": {
    "name": "new ha strategycondition name",
    "state": "Enable"
  },
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateHaStrategyCondition":{"name":"new ha strategycondition name","state":"Enable"}}' http://localhost:8080/zstack/v1/ha-strategy-condition/bf798f9ae94f3007a293f090ec555d57/actions

Request Parameters

Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 4.7.0
name String body (contained in the updateHaStrategyCondition structure) Optional. The resource name. 4.7.0
state String body(contained in the updateHaStrategyCondition structure) Optional. The state 4.7.0
systemTags List body Optional. The system tags. 4.7.0
userTags List body Optional. The user tags. 4.7.0

API Response

Sample Response

{
  "inventory": {
    "uuid": "9a01c1cea2793814b8b1bf228a2ff601",
    "name": "test",
    "fencerName": "hostStorageState"
  }
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 4.7.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 4.7.0
inventory ResourceConfigInventory See inventory. 4.7.0

#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. 4.7.0
description String The brief description of the error. 4.7.0
details String The details about the error. 4.7.0
elaboration String The reserved field. Default value: null. 4.7.0
opaque LinkedHashMap The reserved field. Default value: null. 4.7.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 4.7.0

#inventory

Name Type Description Starting Version
uuid String The resource UUID. 4.7.0
name String The resource namne. 4.7.0
fencerName String The fencer name. 4.7.0
state String The state. 4.7.0
createDate Timestamp The creation date. 4.7.0
lastOpDate Timestamp The last operation date. 4.7.0

SDK Sample

Java SDK

UpdateHaStrategyConditionAction action = new UpdateHaStrategyConditionAction();
action.uuid = "bf798f9ae94f3007a293f090ec555d57";
action.name = "new ha strategycondition name";
action.state = "Enable";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateHaStrategyConditionAction.Result res = action.call();

Python SDK

action = UpdateHaStrategyConditionAction()
action.uuid = "bf798f9ae94f3007a293f090ec555d57"
action.name = "new ha strategycondition name"
action.state = "Enable"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

ChangeHaNetworkGroupState

API Request

URLs

PUT zstack/v1/ha/network-groups/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "changeHaNetworkGroupState": {
    "stateEvent": "disable"
  },
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"changeHaNetworkGroupState":{"stateEvent":"disable"}}' \
http://localhost:8080/zstack/v1/ha/network-groups/865252e42475363f8d3533de038f5680/actions

Request Parameters

Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID, which uniquely identifies the resource. 5.5.6
stateEvent String body (contained in the changeHaNetworkGroupState structure) State event. enable indicates Enable, and disable indicates Disable.
  • enable
  • disable
5.5.6
systemTags (Optional) List body System tags. 5.5.6
userTags (Optional) List body User tags. 5.5.6

API Response

Response Example

{
  "inventory": {
    "uuid": "79d61df9c52b329dab9e601363a7a7f3",
    "name": "ha-network-group-1",
    "type": "Flat",
    "minAvailableCount": 2,
    "state": "Disabled",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM"
  }
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 5.5.6
error ErrorCode Error code. If this field is not null, the operation fails. If the operation succeeds, this field is null. For more information, see error 5.5.6
inventory HaNetworkGroupInventory For more information, see inventory 5.5.6

#inventory

Name Type Description Starting Version
uuid String The resource UUID, which uniquely identifies the resource. 5.5.6
name String Resource name. 5.5.6
description String Detailed description of the resource. 5.5.6
type String Network group type. Flat indicates a Flat Network, and Public indicates a Public Network. 5.5.6
minAvailableCount int Minimum number of available networks. 5.5.6
state String Network group state. 5.5.6
createDate Timestamp Creation time. 5.5.6
lastOpDate Timestamp Last modification time. 5.5.6
l3NetworkUuids Set L3 Network UUID list. 5.5.6

#error

Name Type Description Starting Version
code String Error code, for example, SYS.1000 or HOST.1001. 5.3.20
description String Summary description of the error. 5.3.20
details String Details of the error. 5.3.20
elaboration String Reserved field. The default value is null. 5.3.20
opaque LinkedHashMap Reserved field. The default value is null. 5.3.20
cause ErrorCode Root error that caused the current error. If no root error exists, this field is null. 5.3.20

SDK Example

Java SDK

ChangeHaNetworkGroupStateAction action = new ChangeHaNetworkGroupStateAction();
action.uuid = "865252e42475363f8d3533de038f5680";
action.stateEvent = "disable";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ChangeHaNetworkGroupStateAction.Result res = action.call();

Python SDK

action = ChangeHaNetworkGroupStateAction()
action.uuid = "865252e42475363f8d3533de038f5680"
action.stateEvent = "disable"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

CreateHaNetworkGroup

API Request

URLs

POST zstack/v1/ha/network-groups

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "name": "ha-network-group-1",
    "description": "test ha network group",
    "type": "Flat",
    "minAvailableCount": 1,
    "l3NetworkUuids": [
      "5032dcf201be3083aec2a043417b4753"
    ]
  },
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"name":"ha-network-group-1","description":"test ha network group","type":"Flat","minAvailableCount":1,"l3NetworkUuids":["5032dcf201be3083aec2a043417b4753"]}}' \
http://localhost:8080/zstack/v1/ha/network-groups

Request Parameters

Name Type Location Description Optional Value Starting Version
name String body (contained in the params structure) Resource name. 5.5.6
description (Optional) String body (contained in the params structure) Detailed description of the resource. 5.5.6
type String body (contained in the params structure) Network group type. Flat indicates a Flat Network, and Public indicates a Public Network.
  • Flat
  • Public
5.5.6
minAvailableCount int body (contained in the params structure) Minimum number of available networks. 5.5.6
l3NetworkUuids List body (contained in the params structure) L3 Network UUID list. 5.5.6
resourceUuid (Optional) String body (contained in the params structure) Resource UUID. 5.5.6
tagUuids (Optional) List body (contained in the params structure) Tag UUID list. 5.5.6
systemTags (Optional) List body System tags. 5.5.6
userTags (Optional) List body User tags. 5.5.6

API Response

Response Example

{
  "inventory": {
    "uuid": "5a8e1c376c5e3080a27727ed13f4e88b",
    "name": "ha-network-group-1",
    "description": "test ha network group",
    "type": "Flat",
    "minAvailableCount": 2,
    "state": "Enabled",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM"
  }
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 5.5.6
error ErrorCode Error code. If this field is not null, the operation fails. If the operation succeeds, this field is null. For more information, see error 5.5.6
inventory HaNetworkGroupInventory For more information, see inventory 5.5.6

#inventory

Name Type Description Starting Version
uuid String The resource UUID, which uniquely identifies the resource. 5.5.6
name String Resource name. 5.5.6
description String Detailed description of the resource. 5.5.6
type String Network group type. Flat indicates a Flat Network, and Public indicates a Public Network. 5.5.6
minAvailableCount int Minimum number of available networks. 5.5.6
state String Network group state. 5.5.6
createDate Timestamp Creation time. 5.5.6
lastOpDate Timestamp Last modification time. 5.5.6
l3NetworkUuids Set L3 Network UUID list. 5.5.6

#error

Name Type Description Starting Version
code String Error code, for example, SYS.1000 or HOST.1001. 5.3.20
description String Summary description of the error. 5.3.20
details String Details of the error. 5.3.20
elaboration String Reserved field. The default value is null. 5.3.20
opaque LinkedHashMap Reserved field. The default value is null. 5.3.20
cause ErrorCode Root error that caused the current error. If no root error exists, this field is null. 5.3.20

SDK Example

Java SDK

CreateHaNetworkGroupAction action = new CreateHaNetworkGroupAction();
action.name = "ha-network-group-1";
action.description = "test ha network group";
action.type = "Flat";
action.minAvailableCount = 1;
action.l3NetworkUuids = asList("5032dcf201be3083aec2a043417b4753");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateHaNetworkGroupAction.Result res = action.call();

Python SDK

action = CreateHaNetworkGroupAction()
action.name = "ha-network-group-1"
action.description = "test ha network group"
action.type = "Flat"
action.minAvailableCount = 1
action.l3NetworkUuids = ["5032dcf201be3083aec2a043417b4753"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

DeleteHaNetworkGroup

API Request

URLs

DELETE zstack/v1/ha/network-groups/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE \
http://localhost:8080/zstack/v1/ha/network-groups/a016cfe6c59638de9ffda0a3492c0a69

Request Parameters

Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID, which uniquely identifies the resource. 5.5.6
deleteMode (Optional) String body Delete mode. Valid values: Permissive and Enforcing. Default: Permissive. 5.5.6
systemTags (Optional) List body System tags. 5.5.6
userTags (Optional) List body User tags. 5.5.6

API Response

If this API succeeds, it returns an empty JSON structure {}. If an error occurs, the returned JSON structure contains an error field. For example:

{
    "error": {
        "code": "SYS.1001",
        "description": "A message or a operation timeout",
        "details": "Create VM on KVM timeout after 300s"
    }
}

SDK Example

Java SDK

DeleteHaNetworkGroupAction action = new DeleteHaNetworkGroupAction();
action.uuid = "a016cfe6c59638de9ffda0a3492c0a69";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteHaNetworkGroupAction.Result res = action.call();

Python SDK

action = DeleteHaNetworkGroupAction()
action.uuid = "a016cfe6c59638de9ffda0a3492c0a69"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

QueryHaNetworkGroup

API Request

URLs

GET zstack/v1/ha/network-groups
GET zstack/v1/ha/network-groups/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET \
http://localhost:8080/zstack/v1/ha/network-groups?q=uuid=e61587e2fbe73ddbb3fb86d0273274ca
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET \
http://localhost:8080/zstack/v1/ha/network-groups/0a1a8c10ae693f30b11a2b9ae33939d1

Queryable Fields

Run the CLI command-line tool, enter QueryHaNetworkGroup, and press Tab to view all queryable fields and resources that support cross-table queries.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "ce5a4bf592483839ac3bb6d683328452",
      "name": "ha-network-group-1",
      "description": "test ha network group",
      "type": "Flat",
      "minAvailableCount": 2,
      "state": "Enabled",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 5.5.6
error ErrorCode Error code. If this field is not null, the operation fails. If the operation succeeds, this field is null. For more information, see error 5.5.6
inventories List For more information, see inventories 5.5.6

#inventories

Name Type Description Starting Version
uuid String The resource UUID, which uniquely identifies the resource. 5.5.6
name String Resource name. 5.5.6
description String Detailed description of the resource. 5.5.6
type String Network group type. Flat indicates a Flat Network, and Public indicates a Public Network. 5.5.6
minAvailableCount int Minimum number of available networks. 5.5.6
state String Network group state. 5.5.6
createDate Timestamp Creation time. 5.5.6
lastOpDate Timestamp Last modification time. 5.5.6
l3NetworkUuids Set L3 Network UUID list. 5.5.6

#error

Name Type Description Starting Version
code String Error code, for example, SYS.1000 or HOST.1001. 5.3.20
description String Summary description of the error. 5.3.20
details String Details of the error. 5.3.20
elaboration String Reserved field. The default value is null. 5.3.20
opaque LinkedHashMap Reserved field. The default value is null. 5.3.20
cause ErrorCode Root error that caused the current error. If no root error exists, this field is null. 5.3.20

SDK Example

Java SDK

QueryHaNetworkGroupAction action = new QueryHaNetworkGroupAction();
action.conditions = asList("uuid=1b765617c8c630b3bbeb14a58f728c23");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryHaNetworkGroupAction.Result res = action.call();

Python SDK

action = QueryHaNetworkGroupAction()
action.conditions = ["uuid=7bacfc453b573372b8ed27068c2ee51d"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

UpdateHaNetworkGroup

API Request

URLs

PUT zstack/v1/ha/network-groups/{uuid}

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateHaNetworkGroup": {
    "name": "updated-ha-network-group",
    "description": "updated description",
    "minAvailableCount": 3
  },
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateHaNetworkGroup":{"name":"updated-ha-network-group","description":"updated description","minAvailableCount":3}}' \
http://localhost:8080/zstack/v1/ha/network-groups/33b1d8e00d9234c8aabc8e0f00bf7526

Request Parameters

Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID, which uniquely identifies the resource. 5.5.6
name (Optional) String body (contained in the updateHaNetworkGroup structure) Resource name. 5.5.6
description (Optional) String body (contained in the updateHaNetworkGroup structure) Detailed description of the resource. 5.5.6
minAvailableCount (Optional) Integer body (contained in the updateHaNetworkGroup structure) Minimum number of available networks. 5.5.6
l3NetworkUuids (Optional) List body (contained in the updateHaNetworkGroup structure) L3 Network UUID list. 5.5.6
systemTags (Optional) List body System tags. 5.5.6
userTags (Optional) List body User tags. 5.5.6

API Response

Response Example

{
  "inventory": {
    "uuid": "da53a7ae0e8c3b5f93f7b92c72f7061e",
    "name": "updated-ha-network-group",
    "description": "updated description",
    "type": "Flat",
    "minAvailableCount": 3,
    "state": "Enabled",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM"
  }
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 5.5.6
error ErrorCode Error code. If this field is not null, the operation fails. If the operation succeeds, this field is null. For more information, see error 5.5.6
inventory HaNetworkGroupInventory For more information, see inventory 5.5.6

#inventory

Name Type Description Starting Version
uuid String The resource UUID, which uniquely identifies the resource. 5.5.6
name String Resource name. 5.5.6
description String Detailed description of the resource. 5.5.6
type String Network group type. Flat indicates a Flat Network, and Public indicates a Public Network. 5.5.6
minAvailableCount int Minimum number of available networks. 5.5.6
state String Network group state. 5.5.6
createDate Timestamp Creation time. 5.5.6
lastOpDate Timestamp Last modification time. 5.5.6
l3NetworkUuids Set L3 Network UUID list. 5.5.6

#error

Name Type Description Starting Version
code String Error code, for example, SYS.1000 or HOST.1001. 5.3.20
description String Summary description of the error. 5.3.20
details String Details of the error. 5.3.20
elaboration String Reserved field. The default value is null. 5.3.20
opaque LinkedHashMap Reserved field. The default value is null. 5.3.20
cause ErrorCode Root error that caused the current error. If no root error exists, this field is null. 5.3.20

SDK Example

Java SDK

UpdateHaNetworkGroupAction action = new UpdateHaNetworkGroupAction();
action.uuid = "33b1d8e00d9234c8aabc8e0f00bf7526";
action.name = "updated-ha-network-group";
action.description = "updated description";
action.minAvailableCount = 3;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateHaNetworkGroupAction.Result res = action.call();

Python SDK

action = UpdateHaNetworkGroupAction()
action.uuid = "33b1d8e00d9234c8aabc8e0f00bf7526"
action.name = "updated-ha-network-group"
action.description = "updated description"
action.minAvailableCount = 3
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()