Create role binding Run in API Explorer

POST /v1/role-bindings

Create a Redpanda Cloud role binding.

application/json

Body Required

CreateRoleBindingRequest is the request of CreateRoleBinding.

  • role_binding object
    Hide role_binding attributes Show role_binding attributes object
    • account_id string
    • role_name string
    • scope object
      Hide scope attributes Show scope attributes object
      • resource_id string
      • resource_type string

        Values are SCOPE_RESOURCE_TYPE_RESOURCE_GROUP, SCOPE_RESOURCE_TYPE_NETWORK, SCOPE_RESOURCE_TYPE_CLUSTER, SCOPE_RESOURCE_TYPE_SERVERLESS_CLUSTER, SCOPE_RESOURCE_TYPE_NETWORK_PEERING, or SCOPE_RESOURCE_TYPE_ORGANIZATION.

Responses

  • 201 application/json

    RoleBinding Created

    Hide response attribute Show response attribute object
    • role_binding object
      Hide role_binding attributes Show role_binding attributes object
      • account_id string
      • created_at string(date-time)
      • id string
      • role_name string
      • scope object
        Hide scope attributes Show scope attributes object
        • resource_id string
        • resource_type string

          Values are SCOPE_RESOURCE_TYPE_RESOURCE_GROUP, SCOPE_RESOURCE_TYPE_NETWORK, SCOPE_RESOURCE_TYPE_CLUSTER, SCOPE_RESOURCE_TYPE_SERVERLESS_CLUSTER, SCOPE_RESOURCE_TYPE_NETWORK_PEERING, or SCOPE_RESOURCE_TYPE_ORGANIZATION.

      • updated_at string(date-time)
  • 500 application/json

    Internal Server Error. Reach out to support.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • default application/json

    An unexpected error response.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

POST /v1/role-bindings
curl \
 --request POST 'https://api.redpanda.com/v1/role-bindings' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"role_binding":{"account_id":"string","role_name":"string","scope":{"resource_id":"string","resource_type":"SCOPE_RESOURCE_TYPE_RESOURCE_GROUP"}}}'
Request examples
{
  "role_binding": {
    "account_id": "string",
    "role_name": "string",
    "scope": {
      "resource_id": "string",
      "resource_type": "SCOPE_RESOURCE_TYPE_RESOURCE_GROUP"
    }
  }
}
Response examples (201)
{
  "role_binding": {
    "account_id": "string",
    "created_at": "2025-05-04T09:42:00Z",
    "id": "string",
    "role_name": "string",
    "scope": {
      "resource_id": "string",
      "resource_type": "SCOPE_RESOURCE_TYPE_RESOURCE_GROUP"
    },
    "updated_at": "2025-05-04T09:42:00Z"
  }
}
Response examples (500)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string",
          "localized_message": {
            "locale": "string",
            "message": "string"
          },
          "reason": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (default)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string",
          "localized_message": {
            "locale": "string",
            "message": "string"
          },
          "reason": "string"
        }
      ]
    }
  ],
  "message": "string"
}