Role
- class perses_api.role.GlobalRole[source]
Bases:
RoleBaseThe class includes all necessary methods to access the Perses global roles API
- Parameters:
perses_api_model (APIModel) – Inject a Perses API model object that includes all necessary values and information
- class perses_api.role.ProjectRole[source]
Bases:
RoleBaseThe class includes all necessary methods to access the Perses project-scoped roles API
- Parameters:
- class perses_api.role.RoleBase[source]
Bases:
ResourceBaseThe class includes all necessary base methods to access the Perses roles API
- Parameters:
perses_api_model (APIModel) – Inject a Perses API model object that includes all necessary values and information
- create_role(role) dict[source]
The method includes a functionality to create a new role
- Parameters:
role (Role | GlobalRole) – Specify the role resource to create
- Raises:
Exception – Unspecified error by executing the API call
- Returns:
The created role dict
- Return type:
- delete_role(name: str) None[source]
The method includes a functionality to delete a role by name
- Parameters:
name (str) – Specify the name of the role to delete
- Raises:
ValueError – Missed specifying a necessary value
- get_role(name: str) dict[source]
The method includes a functionality to retrieve a single role by name
- Parameters:
name (str) – Specify the name of the role to retrieve
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The role dict
- Return type:
- update_role(name: str, role) dict[source]
The method includes a functionality to update an existing role by name
- Parameters:
name (str) – Specify the name of the role to update
role (Role | GlobalRole) – Specify the updated role resource
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The updated role dict
- Return type: