Add group to cluster
Adds group {gid} as member of cluster {id}. Optionally, privileges can be passed in the request body, otherwise default privileges will be set for the group in this cluster.
This operation requires cluster_add_group privilege in the cluster and
group_add_cluster privilege in the group. If privileges are
specified in the request, cluster_set_privileges privilege is also required.
For administrator who does not belong to the group / cluster,
oz_groups_add_relationships and oz_clusters_add_relationships privileges
are required, and oz_clusters_set_privileges if privileges are specified
in the request.
Example cURL requests
Add group to cluster
curl -u username:password -H "Content-type: application/json" -X PUT \
https://$HOST/api/v3/onezone/clusters/$CLUSTER_ID/groups/$GROUP_ID
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Cluster Id. |
| gid required | string Group Id. |
Request body
| Property | Type & Description |
|---|---|
privileges array of strings A list of privileges in the cluster. | |
Request Examples
onezone-rest-cli addGroupToCluster id=b752ceafabb662b4e5728b2ded25cdd1 gid=f1c8b1a37aa7447b22eb65a742d40524Responses
The group was added to the cluster.
Invalid request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}