v1.ClusterRole
Expand or mouse-over a field for more information about it.
Create a ClusterRole
HTTP request
Authorization: Bearer $TOKEN
Accept: application/json
Connection: close
Content-Type: application/json'
{
"kind": "ClusterRole",
"apiVersion": "v1",
...
}
Curl request
$ curl -k \
-X POST \
-d @- \
-H "Authorization: Bearer $TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
https://$ENDPOINT/oapi/v1/clusterroles <<'EOF'
{
"kind": "ClusterRole",
"apiVersion": "v1",
...
}
EOF
HTTP body
Query parameters
Parameter | Description |
---|---|
pretty | If ‘true’, then the output is pretty printed. |
Responses
HTTP Code | Schema |
---|---|
200 OK | v1.ClusterRole |
401 Unauthorized |
Consumes
- */*
Produces
application/json
application/yaml
application/vnd.kubernetes.protobuf
Get a ClusterRole
Read the specified ClusterRole
HTTP request
GET /oapi/v1/clusterroles/$NAME HTTP/1.1
Accept: application/json
Connection: close
Curl request
Path parameters
Parameter | Description |
---|---|
name | name of the ClusterRole |
Query parameters
Parameter | Description |
---|---|
pretty | If ‘true’, then the output is pretty printed. |
Responses
HTTP Code | Schema |
---|---|
200 OK | v1.ClusterRole |
401 Unauthorized |
Consumes
- */*
Produces
application/json
application/yaml
application/vnd.kubernetes.protobuf
List objects of kind ClusterRole
HTTP request
GET /oapi/v1/clusterroles HTTP/1.1
Authorization: Bearer $TOKEN
Accept: application/json
Connection: close
Curl request
$ curl -k \
-H "Authorization: Bearer $TOKEN" \
-H 'Accept: application/json' \
https://$ENDPOINT/oapi/v1/clusterroles
Query parameters
Responses
HTTP Code | Schema |
---|---|
200 OK | v1.ClusterRoleList |
401 Unauthorized |
Consumes
- */*
Produces
application/json
application/yaml
application/vnd.kubernetes.protobuf
application/json;stream=watch
application/vnd.kubernetes.protobuf;stream=watch
Update a ClusterRole
Replace the specified ClusterRole
HTTP request
Authorization: Bearer $TOKEN
Accept: application/json
Connection: close
Content-Type: application/json'
{
"kind": "ClusterRole",
"apiVersion": "v1",
...
}
Curl request
HTTP body
Parameter | Schema |
---|---|
body | v1.ClusterRole |
Path parameters
Parameter | Description |
---|---|
name | name of the ClusterRole |
Query parameters
Parameter | Description |
---|---|
pretty | If ‘true’, then the output is pretty printed. |
Responses
HTTP Code | Schema |
---|---|
200 OK | v1.ClusterRole |
401 Unauthorized |
Consumes
- */*
Produces
application/json
application/yaml
application/vnd.kubernetes.protobuf
Partially update the specified ClusterRole
HTTP request
PATCH /oapi/v1/clusterroles/$NAME HTTP/1.1
Authorization: Bearer $TOKEN
Accept: application/json
Content-Type: application/json-patch+json'
{
...
}
Curl request
$ curl -k \
-X PATCH \
-d @- \
-H "Authorization: Bearer $TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json-patch+json' \
https://$ENDPOINT/oapi/v1/clusterroles/$NAME <<'EOF'
{
...
}
EOF
HTTP body
Path parameters
Parameter | Description |
---|---|
name | name of the ClusterRole |
Query parameters
Parameter | Description |
---|---|
pretty | If ‘true’, then the output is pretty printed. |
Responses
HTTP Code | Schema |
---|---|
200 OK | v1.ClusterRole |
401 Unauthorized |
Consumes
application/json-patch+json
application/merge-patch+json
application/strategic-merge-patch+json
Produces
application/json
application/yaml
application/vnd.kubernetes.protobuf
Delete a ClusterRole
Delete a ClusterRole
HTTP request
DELETE /oapi/v1/clusterroles/$NAME HTTP/1.1
Authorization: Bearer $TOKEN
Accept: application/json
Connection: close
Content-Type: application/json'
{
...
Curl request
HTTP body
Parameter | Schema |
---|---|
body | v1.DeleteOptions |
Path parameters
Parameter | Description |
---|---|
name | name of the ClusterRole |
Query parameters
Responses
HTTP Code | Schema |
---|---|
200 OK | v1.Status |
401 Unauthorized |
Consumes
- */*
Produces
application/json
application/vnd.kubernetes.protobuf