Create IAM policy binding
Visibility: public · internal ( OpenAPI Custom Extension: x-visibility )
Bind a role to a user or group at a specific scope.
Authorization
bearerAuth AuthorizationBearer <token>
Bearer token authentication using OAuth2/OIDC tokens
In: header
Request Body
application/json
orgId?string
Organization identifier specified when creating policy as operator admin. When absent, it will be considered as the current user's organization.
role*string
Role identifier to bind
principal*
User or group to bind role to
scope*
Scope of the role binding (org, project, or resource level).
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.k0rdent.ai/v1/regions/global/iam/policies" \ -H "Content-Type: application/json" \ -d '{ "role": "string", "principal": {}, "scope": {} }'{
"selfLink": "/v1/regions/global/iam/policies/policy-g8h9i1",
"uid": "07cc67f4-45d6-494b-adac-09b5cbc7e2b5",
"id": "policy-g8h9i1",
"displayName": "string",
"description": "string",
"role": "string",
"principal": {
"type": "user",
"id": "string"
},
"scope": {
"type": "org",
"resource": "string"
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": 0,
"message": "string",
"details": [
{}
]
}
}{
"error": {
"code": 0,
"message": "string",
"details": [
{}
]
}
}{
"error": {
"code": 0,
"message": "string",
"details": [
{}
]
}
}{
"error": {
"code": 0,
"message": "string",
"details": [
{}
]
}
}How is this guide?