Creating an Instance Group
Function
This API is used to create DDM instances.
Constraints
None
URI
- URL format
- Parameter description
Table 1 Path parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID of a tenant in a region.
To obtain this value, see Obtaining a Project ID.
instance_id
Yes
String
DDM instance ID.
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. You can obtain the token by calling the IAM API used to obtain a user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Name of a DDM instance group, which:
Minimum characters: 4 Maximum characters: 64 |
type |
Yes |
String |
Type of the instance group. rw: read/write group r: read-only group |
flavor_id |
Yes |
String |
Specification ID. |
nodes |
Yes |
Array of Table NodeInfo objects |
Node information list. Minimum value: 1 Maximum value: 32 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
available_zone |
Yes |
String |
AZ where the node is located. The value cannot be empty. For details, see Regions and Endpoints. |
subnet_id |
Yes |
String |
Subnet ID. |
Example Request
Create a DDM instance group. The group type is read/write and the number of nodes is 1.
POST https://{endpoint}/v3/{project_id}/instances/{instance_id}/groups { "name": "group-1", "type": "rw", "flavor_id": "a615922f-0ed8-3691-aad4-a595185febba", "nodes": [ { "available_zone": "az1", "subnet_id": "ead1e945-ca89-45dd-bcce-4a30b2054c22" } ] }
Create a DDM instance group. The group type is read-only and the number of nodes is 1.
POST https://{endpoint}/v3/{project_id}/instances/{instance_id}/groups { "name": "group-2", "type": "r", "flavor_id": "a615922f-0ed8-3691-aad4-a595185febba", "nodes": [ { "available_zone": "az1", "subnet_id": "ead1e945-ca89-45dd-bcce-4a30b2054c22" } ] }
POST https://{endpoint}/v3/{project_id}/instances/{instance_id}/groups { "name": "group-3", "type": "rw", "flavor_id": "a615922f-0ed8-3691-aad4-a595185febba", "nodes": [ { "available_zone": "az1", "subnet_id": "ead1e945-ca89-45dd-bcce-4a30b2054c22" }, { "available_zone": "az2", "subnet_id": "ead1e945-ca89-45dd-bcce-4a30b2054c22" } ] }
Response
- Normal response
Table 5 Response body parameters Parameter
Type
Description
instance_id
String
Instance ID.
job_id
String
ID of the job for creating an instance group.
This parameter is returned only when pay-per-use instances are created.
order_id
String
Order ID. This parameter is returned only when yearly/monthly instances are created.
- Normal response example
{ "instance_id" : "28e8841d0b9c4f6a9a30742ee60e1055****", "job_id" : "1eb697c0-1842-43a3-8671-f562d038****" }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot