Registering a Fleet
Function
This API is used to create a fleet. You can select clusters during fleet creation.
URI
POST /v1/clustergroups
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
No |
String |
Identity authentication information. Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
metadata |
Yes |
Fleet metadata information |
|
|
spec |
No |
RegisterClusterGroupSpec object |
Attribute |
Response Parameters
Status code: 201
|
Parameter |
Type |
Description |
|---|---|---|
|
uid |
String |
Fleet UID |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
- |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
- |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
- |
Example Requests
Creating a fleet and (optional) adding clusters to the fleet
https://ucs.myhuaweicloud.com/v1/clustergroups
{
"metadata" : {
"name" : "group02281605"
},
"spec" : {
"clusterIds" : [ "514c1a3c-8ec7-11ec-b384-0255ac100189", "d4804da3-8f03-11ec-b384-0255ac100189" ],
"description" : "aaaaaaaaa"
}
}
Example Responses
Status code: 201
The fleet has been created (the UID of the fleet is returned).
{
"uid" : "6efb4a18-2fa4-11ee-ad1d-0255ac1001c4"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
201 |
The fleet has been created (the UID of the fleet is returned). |
|
400 |
Client request error. The server could not execute the request. |
|
403 |
The server refused the request. |
|
500 |
Internal server error. |
Error Codes
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