azure.mgmt.authorization.v2015_07_01.operations module¶
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AuthorizationManagementClient’sclassic_administratorsattribute.Gets service administrator, account administrator, and co-administrators for the subscription.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ClassicAdministrator or the result of cls(response)
- Return type
- Raises
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AuthorizationManagementClient’sglobal_administratorattribute.Elevates access for a Global Administrator.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
None or the result of cls(response)
- Return type
- Raises
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AuthorizationManagementClient’spermissionsattribute.Gets all permissions the caller has for a resource.
- Parameters
resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.
resource_provider_namespace (str) – The namespace of the resource provider. Required.
parent_resource_path (str) – The parent resource identity. Required.
resource_type (str) – The resource type of the resource. Required.
resource_name (str) – The name of the resource to get the permissions for. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Permission or the result of cls(response)
- Return type
- Raises
Gets all permissions the caller has for a resource group.
- Parameters
resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Permission or the result of cls(response)
- Return type
- Raises
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AuthorizationManagementClient’sprovider_operations_metadataattribute.Gets provider operations metadata for the specified resource provider.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ProviderOperationsMetadata or the result of cls(response)
- Return type
- Raises
Gets provider operations metadata for all resource providers.
- Parameters
expand (str) – Specifies whether to expand the values. Default value is “resourceTypes”.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ProviderOperationsMetadata or the result of cls(response)
- Return type
- Raises
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AuthorizationManagementClient’srole_assignmentsattribute.-
create(scope: str, role_assignment_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.RoleAssignment 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. Required.
role_assignment_name (str) – A GUID for the role assignment to create. The name must be unique and different for each role assignment. Required.
parameters (RoleAssignmentCreateParameters or IO) – Parameters for the role assignment. Is either a RoleAssignmentCreateParameters type or a IO type. Required.
- Keyword Arguments
- Returns
RoleAssignment or the result of cls(response)
- Return type
- Raises
-
create_by_id(role_assignment_id: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.RoleAssignment Creates a role assignment by ID.
- Parameters
role_assignment_id (str) – The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Required.
parameters (RoleAssignmentCreateParameters or IO) – Parameters for the role assignment. Is either a RoleAssignmentCreateParameters type or a IO type. Required.
- Keyword Arguments
- Returns
RoleAssignment or the result of cls(response)
- Return type
- Raises
Deletes a role assignment.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleAssignment or None or the result of cls(response)
- Return type
- Raises
Deletes a role assignment.
- Parameters
role_assignment_id (str) – The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleAssignment or None or the result of cls(response)
- Return type
- Raises
Get the specified role assignment.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleAssignment or the result of cls(response)
- Return type
- Raises
Gets a role assignment by ID.
- Parameters
role_assignment_id (str) – The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleAssignment or the result of cls(response)
- Return type
- Raises
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. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either RoleAssignment or the result of cls(response)
- Return type
- Raises
Gets role assignments for a resource.
- Parameters
resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.
resource_provider_namespace (str) – The namespace of the resource provider. Required.
parent_resource_path (str) – The parent resource identity. Required.
resource_type (str) – The resource type of the resource. Required.
resource_name (str) – The name of the resource to get role assignments for. Required.
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. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either RoleAssignment or the result of cls(response)
- Return type
- Raises
Gets role assignments for a resource group.
- Parameters
resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.
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. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either RoleAssignment or the result of cls(response)
- Return type
- Raises
Gets role assignments for a scope.
- Parameters
scope (str) – The scope of the role assignments. Required.
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. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either RoleAssignment or the result of cls(response)
- Return type
- Raises
-
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AuthorizationManagementClient’srole_definitionsattribute.-
create_or_update(scope: str, role_definition_id: str, role_definition: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.RoleDefinition Creates or updates a role definition.
- Parameters
scope (str) – The scope of the role definition. Required.
role_definition_id (str) – The ID of the role definition. Required.
role_definition (RoleDefinition or IO) – The values for the role definition. Is either a RoleDefinition type or a IO type. Required.
- Keyword Arguments
- Returns
RoleDefinition or the result of cls(response)
- Return type
- Raises
Deletes a role definition.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleDefinition or None or the result of cls(response)
- Return type
- Raises
Get role definition by name (GUID).
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleDefinition or the result of cls(response)
- Return type
- Raises
Gets a role definition by ID.
- Parameters
role_definition_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. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleDefinition or the result of cls(response)
- Return type
- Raises
Get all role definitions that are applicable at scope and above.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either RoleDefinition or the result of cls(response)
- Return type
- Raises
-