• SAP HANA

saphana
  1. Help Center
  2. SAP HANA
  3. User Guide (API)
  4. Creating a HANA ECS
  5. Creating an Anti-affinity ECS Group

Creating an Anti-affinity ECS Group

If a HANA cluster is used, you must create an anti-affinity ECS group to ensure HA ECS scheduling.

For detailed API information, see Native OpenStack API Reference.

API Format

Method

URI

Description

POST

/v2/{tenant_id}/os-server-groups

Creates an ECS group.

Restrictions

Only the public cloud supports anti-affinity ECS groups.

Expansion

N/A

Request Parameters

Parameter

Type

Mandatory or Not

Description

server_group

Dict

Yes

Specifies an ECS group.

server_group parameters

Parameter

Type

Mandatory or Not

Description

name

String

Yes

Specifies an ECS group name, which consists of a maximum of 255 characters. The name can consist of only digits, letters (case sensitive), underscores (_), hyphens (-), dots (.), and spaces.

policies

List (String)

Yes

Specifies an ECS group type, which can be anti-affinity or affinity. The public cloud supports only anti-affinity. Therefore, retain the default setting.

Response Parameters

Parameter

Type

Mandatory or Not

Description

server_group

Dict

Yes

Specifies an ECS group.

[1] server_group parameters

Parameter

Type

Mandatory or Not

Description

id

UUID

Yes

Specifies an ECS group UUID.

name

String

Yes

Specifies an ECS group name.

policies

List (String)

Yes

Specifies an ECS group type.

members

List (String)

Yes

Specifies the ECSs in an ECS group.

metadata

Dict

Yes

Specifies ECS group metadata.

project_id

UUID

Yes

Specifies the ID of the tenant who owns the ECS group.

Request Example

POST /v2/9c53a566cb3443ab910cf0daebca90c4/os-server-groups
{
   "server_group": {
   "name": "hanagroup1",
   "policies": ["anti-affinity"]
  }
}

Response Example

{
  "server_group": {
    "id": "5bbcc3c4-1da2-4437-a48a-66f15b1b13f9",
    "name": "test",
    "policies": ["anti-affinity"],
    "members": [],
    "metadata": {},
    "project_id": "9c53a566cb3443ab910cf0daebca90c4"
  }
}