RoleDefinitionsOperations Class

RoleDefinitionsOperations async 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.object
RoleDefinitionsOperations

Constructor

RoleDefinitionsOperations(client, config, serializer, deserializer) -> None

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

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: azure.mgmt.authorization.v2018_01_01_preview.models._models_py3.RoleDefinition, **kwargs) -> azure.mgmt.authorization.v2018_01_01_preview.models._models_py3.RoleDefinition

Parameters

scope
str
Required

The scope of the role definition.

role_definition_id
str
Required

The ID of the role definition.

role_definition
RoleDefinition
Required

The values for the role definition.

cls
callable

A custom type or function that will be passed the direct response

Returns

RoleDefinition, or the result of cls(response)

Return type

delete

Deletes a role definition.

delete(scope: str, role_definition_id: str, **kwargs) -> azure.mgmt.authorization.v2018_01_01_preview.models._models_py3.RoleDefinition

Parameters

scope
str
Required

The scope of the role definition.

role_definition_id
str
Required

The ID of the role definition to delete.

cls
callable

A custom type or function that will be passed the direct response

Returns

RoleDefinition, or the result of cls(response)

Return type

get

Get role definition by name (GUID).

get(scope: str, role_definition_id: str, **kwargs) -> azure.mgmt.authorization.v2018_01_01_preview.models._models_py3.RoleDefinition

Parameters

scope
str
Required

The scope of the role definition.

role_definition_id
str
Required

The ID of the role definition.

cls
callable

A custom type or function that will be passed the direct response

Returns

RoleDefinition, or the result of cls(response)

Return type

get_by_id

Gets a role definition by ID.

get_by_id(role_id: str, **kwargs) -> azure.mgmt.authorization.v2018_01_01_preview.models._models_py3.RoleDefinition

Parameters

role_id
str
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.

cls
callable

A custom type or function that will be passed the direct response

Returns

RoleDefinition, or the result of cls(response)

Return type

list

Get all role definitions that are applicable at scope and above.

list(scope: str, filter: typing.Union[str, NoneType] = None, **kwargs) -> typing.AsyncIterable[_ForwardRef('_models.RoleDefinitionListResult')]

Parameters

scope
str
Required

The scope of the role definition.

filter
str
default value: None

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

Attributes

models

models = <module 'azure.mgmt.authorization.v2018_01_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.6.8\\x64\\lib\\site-packages\\azure\\mgmt\\authorization\\v2018_01_01_preview\\models\\__init__.py'>