Role Binding
- class perses_api.role_binding.GlobalRoleBinding[source]
Bases:
RoleBindingBaseThe class includes all necessary methods to access the Perses global role bindings API
- Parameters:
perses_api_model (APIModel) – Inject a Perses API model object that includes all necessary values and information
- class perses_api.role_binding.ProjectRoleBinding[source]
Bases:
RoleBindingBaseThe class includes all necessary methods to access the Perses project-scoped role bindings API
- Parameters:
- class perses_api.role_binding.RoleBindingBase[source]
Bases:
ResourceBaseThe class includes all necessary base methods to access the Perses role bindings API
- Parameters:
perses_api_model (APIModel) – Inject a Perses API model object that includes all necessary values and information
- create_role_binding(role_binding) dict[source]
The method includes a functionality to create a new role binding
- Parameters:
role_binding (RoleBinding | GlobalRoleBinding) – Specify the role binding resource to create
- Raises:
Exception – Unspecified error by executing the API call
- Returns:
The created role binding dict
- Return type:
- delete_role_binding(name: str) None[source]
The method includes a functionality to delete a role binding by name
- Parameters:
name (str) – Specify the name of the role binding to delete
- Raises:
ValueError – Missed specifying a necessary value
- get_role_binding(name: str) dict[source]
The method includes a functionality to retrieve a single role binding by name
- Parameters:
name (str) – Specify the name of the role binding to retrieve
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The role binding dict
- Return type:
- get_role_bindings(name: str = None) list[source]
The method includes a functionality to retrieve all role bindings
- update_role_binding(name: str, role_binding) dict[source]
The method includes a functionality to update an existing role binding by name
- Parameters:
name (str) – Specify the name of the role binding to update
role_binding (RoleBinding | GlobalRoleBinding) – Specify the updated role binding resource
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The updated role binding dict
- Return type: