azure.mgmt.authorization.operations module

class azure.mgmt.authorization.operations.ClassicAdministratorsOperations(client, config, serializer, deserializer)[source]

Bases: object

ClassicAdministratorsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
list(api_version, custom_headers=None, raw=False, **operation_config)[source]

Gets service administrator, account administrator, and co-administrators for the subscription.

Parameters:
  • api_version (str) – The API version to use for this operation.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ClassicAdministratorPaged

Raises:

CloudError

class azure.mgmt.authorization.operations.PermissionsOperations(client, config, serializer, deserializer)[source]

Bases: object

PermissionsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
list_for_resource(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers=None, raw=False, **operation_config)[source]

Gets all permissions the caller has for a resource.

Parameters:
  • resource_group_name (str) – The name of the resource group containing the resource. The name is case insensitive.
  • resource_provider_namespace (str) – The namespace of the resource provider.
  • parent_resource_path (str) – The parent resource identity.
  • resource_type (str) – The resource type of the resource.
  • resource_name (str) – The name of the resource to get the permissions for.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

PermissionPaged

Raises:

CloudError

list_for_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Gets all permissions the caller has for a resource group.

Parameters:
  • resource_group_name (str) – The name of the resource group to get the permissions for. The name is case insensitive.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

PermissionPaged

Raises:

CloudError

class azure.mgmt.authorization.operations.ProviderOperationsMetadataOperations(client, config, serializer, deserializer)[source]

Bases: object

ProviderOperationsMetadataOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
get(resource_provider_namespace, api_version, expand='resourceTypes', custom_headers=None, raw=False, **operation_config)[source]

Gets provider operations metadata for the specified resource provider.

Parameters:
  • resource_provider_namespace (str) – The namespace of the resource provider.
  • api_version (str) – The API version to use for the operation.
  • expand (str) – Specifies whether to expand the values.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ProviderOperationsMetadata

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

list(api_version, expand='resourceTypes', custom_headers=None, raw=False, **operation_config)[source]

Gets provider operations metadata for all resource providers.

Parameters:
  • api_version (str) – The API version to use for this operation.
  • expand (str) – Specifies whether to expand the values.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ProviderOperationsMetadataPaged

Raises:

CloudError

class azure.mgmt.authorization.operations.RoleAssignmentsOperations(client, config, serializer, deserializer)[source]

Bases: object

RoleAssignmentsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
create(scope, role_assignment_name, properties=None, custom_headers=None, raw=False, **operation_config)[source]

Creates a role assignment.

Parameters:
  • scope (str) – The scope of the role assignment to create. The scope can be any REST resource instance. For example, use ‘/subscriptions/{subscription-id}/’ for a subscription, ‘/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}’ for a resource group, and ‘/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}’ for a resource.
  • role_assignment_name (str) – The name of the role assignment to create. It can be any valid GUID.
  • properties (RoleAssignmentProperties) – Role assignment properties.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleAssignment

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

create_by_id(role_assignment_id, properties=None, custom_headers=None, raw=False, **operation_config)[source]

Creates a role assignment by ID.

Parameters:
  • role_assignment_id (str) – The ID of the role assignment to create.
  • properties (RoleAssignmentProperties) – Role assignment properties.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleAssignment

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(scope, role_assignment_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a role assignment.

Parameters:
  • scope (str) – The scope of the role assignment to delete.
  • role_assignment_name (str) – The name of the role assignment to delete.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleAssignment

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete_by_id(role_assignment_id, custom_headers=None, raw=False, **operation_config)[source]

Deletes a role assignment.

Parameters:
  • role_assignment_id (str) – The ID of the role assignment to delete.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleAssignment

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get(scope, role_assignment_name, custom_headers=None, raw=False, **operation_config)[source]

Get the specified role assignment.

Parameters:
  • scope (str) – The scope of the role assignment.
  • role_assignment_name (str) – The name of the role assignment to get.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleAssignment

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get_by_id(role_assignment_id, custom_headers=None, raw=False, **operation_config)[source]

Gets a role assignment by ID.

Parameters:
  • role_assignment_id (str) – The ID of the role assignment to get.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleAssignment

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

list(filter=None, custom_headers=None, raw=False, **operation_config)[source]

Gets all role assignments for the subscription.

Parameters:
  • filter (str) – The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleAssignmentPaged

Raises:

CloudError

list_for_resource(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config)[source]

Gets role assignments for a resource.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • resource_provider_namespace (str) – The namespace of the resource provider.
  • parent_resource_path (str) – The parent resource identity.
  • resource_type (str) – The resource type of the resource.
  • resource_name (str) – The name of the resource to get role assignments for.
  • filter (str) – The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleAssignmentPaged

Raises:

CloudError

list_for_resource_group(resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config)[source]

Gets role assignments for a resource group.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • filter (str) – The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleAssignmentPaged

Raises:

CloudError

list_for_scope(scope, filter=None, custom_headers=None, raw=False, **operation_config)[source]

Gets role assignments for a scope.

Parameters:
  • scope (str) – The scope of the role assignments.
  • filter (str) – The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleAssignmentPaged

Raises:

CloudError

class azure.mgmt.authorization.operations.RoleDefinitionsOperations(client, config, serializer, deserializer)[source]

Bases: object

RoleDefinitionsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
create_or_update(scope, role_definition_id, role_definition, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a role definition.

Parameters:
  • scope (str) – The scope of the role definition.
  • role_definition_id (str) – The ID of the role definition.
  • role_definition (RoleDefinition) – The values for the role definition.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleDefinition

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(scope, role_definition_id, custom_headers=None, raw=False, **operation_config)[source]

Deletes a role definition.

Parameters:
  • scope (str) – The scope of the role definition.
  • role_definition_id (str) – The ID of the role definition to delete.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleDefinition

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get(scope, role_definition_id, custom_headers=None, raw=False, **operation_config)[source]

Get role definition by name (GUID).

Parameters:
  • scope (str) – The scope of the role definition.
  • role_definition_id (str) – The ID of the role definition.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleDefinition

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get_by_id(role_definition_id, custom_headers=None, raw=False, **operation_config)[source]

Gets a role definition by ID.

Parameters:
  • role_definition_id (str) – The fully qualified role definition ID to get.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleDefinition

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

list(scope, filter=None, custom_headers=None, raw=False, **operation_config)[source]

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

Parameters:
  • scope (str) – The scope of the role definition.
  • filter (str) – The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RoleDefinitionPaged

Raises:

CloudError