Bind roles for users
Requests
HTTP request
POST /apis/auth.alauda.io/v1/userbindings
create an UserBinding
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| dryRun | string | False | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
| fieldManager | string | False | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. |
| pretty | string | False | If 'true', then the output is pretty printed. |
Request body
Content-Type
application/json,
application/yaml
Sample request
UserBinding is the Schema for the userbindings API
{
"apiVersion": "auth.alauda.io/v1",
"kind": "UserBinding",
"metadata": {
"labels": {
"alauda.io/cluster": "global",
"alauda.io/namespace": "mypro05-ns02",
"alauda.io/project": "mypro05",
"auth.alauda.io/role.display-name": "25csTPfjLWprj",
"auth.alauda.io/role.level": "namespace",
"auth.alauda.io/role.name": "st_namespace_auditor",
"auth.alauda.io/user.email": "48ce85b3d68fee7ae5f2c3f742234414"
},
"name": "15ad3b265b7af45227036fe242b22fdd"
}
}Parmeters
| Name | Type | Required | Description |
|---|---|---|---|
| apiVersion | string | True | See common parameters |
| kind | string | True | See common parameters |
| metadata | object | True | See common parameters |
Responses
Content-Type
application/json,
application/yaml
Status code: 201
Created
Sample response
UserBinding is the Schema for the userbindings API
{
"apiVersion": "auth.alauda.io/v1",
"kind": "UserBinding",
"metadata": {
"creationTimestamp": "2019-05-23T02:33:04Z",
"labels": {
"alauda.io/cluster": "global",
"alauda.io/namespace": "mypro05-ns02",
"alauda.io/project": "mypro05",
"auth.alauda.io/role.display-name": "25csTPfjLWprj",
"auth.alauda.io/role.level": "namespace",
"auth.alauda.io/role.name": "st_namespace_auditor",
"auth.alauda.io/user.email": "48ce85b3d68fee7ae5f2c3f742234414"
},
"name": "15ad3b265b7af45227036fe242b22fdd"
}
}Parameters
| Name | Type | Description |
|---|---|---|
| apiVersion | string | See common parameters |
| kind | string | See common parameters |
| metadata | object | See common parameters |