为项目绑定集群
请求信息
请求行
POST /apis/auth.alauda.io/v1/projectbindings
创建一个项目绑定关系。
请求参数
名称 | 类型 | 是否必填项 | 描述 |
---|---|---|---|
dryRun | string | 否 | 当该参数出现时,表示不应该持久化修改。一个无效的或无法识别的 dryRun 指令将导致错误响应,并且不会进一步处理请求。有效值为:All,将处理所有的试运行阶段。 |
fieldManager | string | 否 | fieldManager 是与正在进行这些更改的参与者或实体相关联的名称。值必须少于 128 字符,且仅包含可打印字符,参见 https://golang.org/pkg/unicode/#IsPrint。 |
pretty | string | 否 | 如果为 true,则会将返回结果输出成适合打印的格式。 |
请求体
Content-Type
application/json
,
application/yaml
请求体示例
{
"apiVersion": "auth.alauda.io/v1",
"kind": "ProjectBinding",
"metadata": {
"labels": {
"cpaas.io/cluster": "global",
"cpaas.io/project": "cpaas"
},
"name": "cpaas-global",
"ownerReferences": [
{
"apiVersion": "auth.alauda.io/v1",
"blockOwnerDeletion": true,
"controller": true,
"kind": "Project",
"name": "cpaas",
"uid": "a83c11df-d3ea-487b-bbbf-0e2a164a5cef"
}
]
}
}
请求体说明
名称 | 类型 | 是否必填项 | 描述 |
---|---|---|---|
apiVersion | string | 是 | 查看公共参数 |
kind | string | 是 | 查看公共参数 |
metadata | object | 是 | 查看公共参数 |
返回信息
Content-Type
application/json
,
application/yaml
状态码: 201
Created
返回体示例
{
"apiVersion": "auth.alauda.io/v1",
"kind": "ProjectBinding",
"metadata": {
"creationTimestamp": "2021-06-24T12:15:45Z",
"generation": 1,
"labels": {
"cpaas.io/cluster": "global",
"cpaas.io/project": "cpaas"
},
"name": "cpaas-global",
"ownerReferences": [
{
"apiVersion": "auth.alauda.io/v1",
"blockOwnerDeletion": true,
"controller": true,
"kind": "Project",
"name": "cpaas",
"uid": "a83c11df-d3ea-487b-bbbf-0e2a164a5cef"
}
],
"resourceVersion": "3604062",
"selfLink": "/apis/auth.alauda.io/v1/projectbindings/cpaas-global",
"uid": "11f4e9c4-a804-493f-96e7-faef05791e99"
},
"spec": {},
"status": {}
}
返回体说明
名称 | 类型 | 描述 |
---|---|---|
apiVersion | string | 查看公共参数 |
kind | string | 查看公共参数 |
metadata | object | 查看公共参数 |