RoleDefinitionsOperations Class
RoleDefinitionsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectRoleDefinitionsOperations
Constructor
RoleDefinitionsOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| create_or_update |
Creates or updates a role definition. |
| delete |
Deletes a role definition. |
| get |
Get role definition by name (GUID). |
| get_by_id |
Gets a role definition by ID. |
| list |
Get all role definitions that are applicable at scope and above. |
create_or_update
Creates or updates a role definition.
create_or_update(scope: str, role_definition_id: str, role_definition: _models.RoleDefinition, **kwargs: Any) -> _models.RoleDefinition
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RoleDefinition, or the result of cls(response)
Return type
Exceptions
delete
Deletes a role definition.
delete(scope: str, role_definition_id: str, **kwargs: Any) -> Optional[_models.RoleDefinition]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RoleDefinition, or the result of cls(response)
Return type
Exceptions
get
Get role definition by name (GUID).
get(scope: str, role_definition_id: str, **kwargs: Any) -> _models.RoleDefinition
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RoleDefinition, or the result of cls(response)
Return type
Exceptions
get_by_id
Gets a role definition by ID.
get_by_id(role_id: str, **kwargs: Any) -> _models.RoleDefinition
Parameters
- role_id
- str
The fully qualified role definition ID. Use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for subscription level role definitions, or /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant level role definitions.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RoleDefinition, or the result of cls(response)
Return type
Exceptions
list
Get all role definitions that are applicable at scope and above.
list(scope: str, filter: Optional[str] = None, **kwargs: Any) -> Iterable[_models.RoleDefinitionListResult]
Parameters
- filter
- str
The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either RoleDefinitionListResult or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.authorization.v2018_01_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\authorization\\v2018_01_01_preview\\models\\__init__.py'>
Feedback
Submit and view feedback for