RoleDefinitionsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AuthorizationManagementClient's
<xref:role_definitions> attribute.
- Inheritance
-
builtins.objectRoleDefinitionsOperations
Constructor
RoleDefinitionsOperations(*args, **kwargs)
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, *, content_type: str = 'application/json', **kwargs: Any) -> _models.RoleDefinition
Parameters
Name | Description |
---|---|
scope
Required
|
The scope of the role definition. Required. |
role_definition_id
Required
|
The ID of the role definition. Required. |
role_definition
Required
|
RoleDefinition or
IO
The values for the role definition. Is either a RoleDefinition type or a IO type. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
RoleDefinition or the result of cls(response) |
Exceptions
Type | Description |
---|---|
delete
Deletes a role definition.
delete(scope: str, role_definition_id: str, **kwargs: Any) -> RoleDefinition | None
Parameters
Name | Description |
---|---|
scope
Required
|
The scope of the role definition. Required. |
role_definition_id
Required
|
The ID of the role definition to delete. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
RoleDefinition or None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Get role definition by name (GUID).
get(scope: str, role_definition_id: str, **kwargs: Any) -> RoleDefinition
Parameters
Name | Description |
---|---|
scope
Required
|
The scope of the role definition. Required. |
role_definition_id
Required
|
The ID of the role definition. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
RoleDefinition or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get_by_id
Gets a role definition by ID.
get_by_id(role_id: str, **kwargs: Any) -> RoleDefinition
Parameters
Name | Description |
---|---|
role_id
Required
|
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. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
RoleDefinition or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
Get all role definitions that are applicable at scope and above.
list(scope: str, filter: str | None = None, **kwargs: Any) -> Iterable[RoleDefinition]
Parameters
Name | Description |
---|---|
scope
Required
|
The scope of the role definition. Required. |
filter
Required
|
The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well. Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either RoleDefinition or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.authorization.v2018_01_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\authorization\\v2018_01_01_preview\\models\\__init__.py'>
Azure SDK for Python