Create a group-to-role mapping entry
POST /security/group/role-mappings
Introduced In: 9.16
Creates a group to role mapping entry.
Required properties
-
group_id
-
ontap_role
Optional properties
-
comment
Related ONTAP commands
-
security login group role-mapping create
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned.
|
Request Body
Name | Type | Description |
---|---|---|
comment |
string |
Any comment regarding this group entry. |
group_id |
integer |
Group ID. |
ontap_role |
Role name. |
|
scope |
string |
Scope of the entity. Set to "cluster" for cluster owned objects and to "svm" for SVM owned objects. |
Example request
{
"comment": "string",
"group_id": 1,
"ontap_role": {
"name": "admin"
},
"scope": "string"
}
Response
Status: 201, Created
Name | Type | Description |
---|---|---|
num_records |
integer |
Number of records. |
records |
array[group_role_mappings] |
Example response
{
"records": [
{
"comment": "string",
"group_id": 1,
"ontap_role": {
"name": "admin"
},
"scope": "string"
}
]
}
Headers
Name | Description | Type |
---|---|---|
Location |
Useful for tracking the resource location |
string |
Error
Status: Default
ONTAP Error Response Codes
Error Code | Description |
---|---|
5636242 |
The configured group ID does not exist in the group configuration. |
5636243 |
The configured role name does not exist in the SVM where the group ID is configured. |
Also see the table of common errors in the Response body overview section of this documentation.
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
ontap_role
Role name.
Name | Type | Description |
---|---|---|
name |
string |
Role name |
group_role_mappings
Name | Type | Description |
---|---|---|
comment |
string |
Any comment regarding this group entry. |
group_id |
integer |
Group ID. |
ontap_role |
Role name. |
|
scope |
string |
Scope of the entity. Set to "cluster" for cluster owned objects and to "svm" for SVM owned objects. |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
returned_error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |