Home / API Documentation / Project management / Project binding cluster / Bind a cluster for the project

Bind a cluster for the project

Requests

HTTP request

POST /apis/auth.alauda.io/v1/projectbindings

create a ProjectBinding

Query parameters

Name Type Required Description
dryRun string FalseWhen 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 FalsefieldManager 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 FalseIf 'true', then the output is pretty printed.

Request body

Content-Type application/json, application/yaml

Sample request

{
   "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"
       }
     ]
   }
 }

Parmeters

Name Type Required Description
apiVersion string TrueSee common parameters
kind string TrueSee common parameters
metadata object TrueSee common parameters

Responses

Content-Type application/json, application/yaml

Status code: 201

Created

Sample response

{
   "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": {}
 }

Parameters

Name Type Description
apiVersion string See common parameters
kind string See common parameters
metadata object See common parameters

Other status codes

Status code: 200

OK

Status code: 202

Accepted

Status code: 401

Unauthorized