更新时间:2022-05-10 GMT+08:00
分享

更新指定的ClusterRole

功能介绍

This API is used to partially update the specified ClusterRole

URL

PATCH /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}

参数解释描述该API的参数。

表1 参数解释

参数

是否必选

描述

name

Yes

name of the ClusterRole.

pretty

No

If 'true', then the output is pretty printed.

body

Yes

-

请求消息

请求参数:

请求参数的详细描述请参见请求参数

“Content-Type”的详细描述请参见 PATCH请求方法操作说明

请求示例:

{
	"kind": "ClusterRole",
	"apiVersion": "rbac.authorization.k8s.io/v1",
	"metadata": {
		"name": "secret-reader",
		"selfLink": "/apis/rbac.authorization.k8s.io/v1/clusterroles/secret-reader",
		"uid": "6a044ac2-f213-11e8-b449-fa163ec24e06",
		"resourceVersion": "44658",
		"creationTimestamp": "2018-11-27T07:09:43Z"
	},
	"rules": [{
		"verbs": ["get","list"],
		"apiGroups": [""],
		"resources": ["secrets"]
	}]
}

响应消息

响应参数:

响应参数的详细描述请参见请求参数

响应示例:

{
	"kind": "ClusterRole",
	"apiVersion": "rbac.authorization.k8s.io/v1",
	"metadata": {
		"name": "secret-reader",
		"selfLink": "/apis/rbac.authorization.k8s.io/v1/clusterroles/secret-reader",
		"uid": "c5986470-f2d5-11e8-b449-fa163ec24e06",
		"resourceVersion": "225014",
		"creationTimestamp": "2018-11-28T06:20:59Z"
	},
	"rules": [{
		"verbs": ["get","list"],
		"apiGroups": [""],
		"resources": ["secrets"]
	}]
	
}

状态码

状态码描述API的状态码。

表2 状态码

状态码

描述

200

OK

分享:

    相关文档

    相关产品

close