azure.mgmt.authorization.v2020_10_01_preview.operations module¶
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AuthorizationManagementClient’seligible_child_resourcesattribute.Get the child resources of a resource on which user has eligible access.
- Parameters
scope (str) – The scope of the role management policy. Required.
filter (str) – The filter to apply on the operation. Use $filter=resourceType+eq+’Subscription’ to filter on only resource of type = ‘Subscription’. Use $filter=resourceType+eq+’subscription’+or+resourceType+eq+’resourcegroup’ to filter on resource of type = ‘Subscription’ or ‘ResourceGroup’. 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 EligibleChildResource 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_assignment_schedule_instancesattribute.Gets the specified role assignment schedule instance.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleAssignmentScheduleInstance or the result of cls(response)
- Return type
- Raises
Gets role assignment schedule instances of a role assignment schedule.
- Parameters
scope (str) – The scope of the role assignment schedule. Required.
filter (str) – The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo(‘{userId}’) to return all role assignment schedule instances for the user. Use $filter=asTarget() to return all role assignment schedule instances created for the current user. 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 RoleAssignmentScheduleInstance 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_assignment_schedule_requestsattribute.Cancels a pending role assignment schedule request.
- Parameters
- 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
-
create(scope: str, role_assignment_schedule_request_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.RoleAssignmentScheduleRequest Creates a role assignment schedule request.
- Parameters
scope (str) – The scope of the role assignment schedule request to create. The scope can be any REST resource instance. For example, use ‘/providers/Microsoft.Subscription/subscriptions/{subscription-id}/’ for a subscription, ‘/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}’ for a resource group, and ‘/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}’ for a resource. Required.
role_assignment_schedule_request_name (str) – A GUID for the role assignment to create. The name must be unique and different for each role assignment. Required.
parameters (RoleAssignmentScheduleRequest or IO) – Parameters for the role assignment schedule request. Is either a RoleAssignmentScheduleRequest type or a IO type. Required.
- Keyword Arguments
- Returns
RoleAssignmentScheduleRequest or the result of cls(response)
- Return type
- Raises
Get the specified role assignment schedule request.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleAssignmentScheduleRequest or the result of cls(response)
- Return type
- Raises
Gets role assignment schedule requests for a scope.
- Parameters
scope (str) – The scope of the role assignments schedule requests. Required.
filter (str) – The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role assignment schedule requests requested by the current user. Use $filter=asTarget() to return all role assignment schedule requests created for the current user. Use $filter=asApprover() to return all role assignment schedule requests where the current user is an approver. 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 RoleAssignmentScheduleRequest 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_assignment_schedulesattribute.Get the specified role assignment schedule for a resource scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleAssignmentSchedule or the result of cls(response)
- Return type
- Raises
Gets role assignment schedules for a resource scope.
- Parameters
scope (str) – The scope of the role assignments schedules. Required.
filter (str) – The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo(‘{userId}’) to return all role assignment schedules for the current user. Use $filter=asTarget() to return all role assignment schedules created for the current user. 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 RoleAssignmentSchedule 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 Create or update a role assignment by scope and name.
- Parameters
scope (str) – The scope of the operation or resource. Valid scopes are: subscription (format: ‘/subscriptions/{subscriptionId}’), resource group (format: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’, or resource (format: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}’. Required.
role_assignment_name (str) – The name of the role assignment. It can be any valid GUID. 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 Create or update a role assignment by ID.
- Parameters
role_assignment_id (str) – The fully qualified ID of the role assignment including scope, resource name, and resource type. Format: /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/
<SUB_ID>/resourcegroups/<RESOURCE_GROUP>/providers/Microsoft.Authorization/roleAssignments/<ROLE_ASSIGNMENT_NAME>. 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
Delete a role assignment by scope and name.
- Parameters
scope (str) – The scope of the operation or resource. Valid scopes are: subscription (format: ‘/subscriptions/{subscriptionId}’), resource group (format: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’, or resource (format: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}’. Required.
role_assignment_name (str) – The name of the role assignment. It can be any valid GUID. Required.
tenant_id (str) – Tenant ID for cross-tenant request. Default value is None.
- 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
Delete a role assignment by ID.
- Parameters
role_assignment_id (str) – The fully qualified ID of the role assignment including scope, resource name, and resource type. Format: /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/
<SUB_ID>/resourcegroups/<RESOURCE_GROUP>/providers/Microsoft.Authorization/roleAssignments/<ROLE_ASSIGNMENT_NAME>. Required.tenant_id (str) – Tenant ID for cross-tenant request. Default value is None.
- 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 a role assignment by scope and name.
- Parameters
scope (str) – The scope of the operation or resource. Valid scopes are: subscription (format: ‘/subscriptions/{subscriptionId}’), resource group (format: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’, or resource (format: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}’. Required.
role_assignment_name (str) – The name of the role assignment. It can be any valid GUID. Required.
tenant_id (str) – Tenant ID for cross-tenant request. Default value is None.
- 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
Get a role assignment by ID.
- Parameters
role_assignment_id (str) – The fully qualified ID of the role assignment including scope, resource name, and resource type. Format: /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/
<SUB_ID>/resourcegroups/<RESOURCE_GROUP>/providers/Microsoft.Authorization/roleAssignments/<ROLE_ASSIGNMENT_NAME>. Required.tenant_id (str) – Tenant ID for cross-tenant request. Default value is None.
- 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
List all role assignments that apply to 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.
resource_type (str) – The resource type name. For example the type name of a web app is ‘sites’ (from Microsoft.Web/sites). Required.
resource_name (str) – The resource name. 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.
tenant_id (str) – Tenant ID for cross-tenant request. 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
List all role assignments that apply to 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.
tenant_id (str) – Tenant ID for cross-tenant request. 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
List all role assignments that apply to a scope.
- Parameters
scope (str) – The scope of the operation or resource. Valid scopes are: subscription (format: ‘/subscriptions/{subscriptionId}’), resource group (format: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’, or resource (format: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}’. 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.
tenant_id (str) – Tenant ID for cross-tenant request. 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
List all role assignments that apply to a 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.
tenant_id (str) – Tenant ID for cross-tenant request. 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
-
validate(scope: str, role_assignment_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ValidationResponse Validate a role assignment create or update operation by scope and name.
- Parameters
scope (str) – The scope of the operation or resource. Valid scopes are: subscription (format: ‘/subscriptions/{subscriptionId}’), resource group (format: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’, or resource (format: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}’. Required.
role_assignment_name (str) – The name of the role assignment. It can be any valid GUID. Required.
parameters (RoleAssignmentCreateParameters or IO) – Parameters for the role assignment. Is either a RoleAssignmentCreateParameters type or a IO type. Required.
- Keyword Arguments
- Returns
ValidationResponse or the result of cls(response)
- Return type
- Raises
-
validate_by_id(role_assignment_id: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ValidationResponse Validate a role assignment create or update operation by ID.
- Parameters
role_assignment_id (str) – The fully qualified ID of the role assignment including scope, resource name, and resource type. Format: /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/
<SUB_ID>/resourcegroups/<RESOURCE_GROUP>/providers/Microsoft.Authorization/roleAssignments/<ROLE_ASSIGNMENT_NAME>. Required.parameters (RoleAssignmentCreateParameters or IO) – Parameters for the role assignment. Is either a RoleAssignmentCreateParameters type or a IO type. Required.
- Keyword Arguments
- Returns
ValidationResponse 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_eligibility_schedule_instancesattribute.Gets the specified role eligibility schedule instance.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleEligibilityScheduleInstance or the result of cls(response)
- Return type
- Raises
Gets role eligibility schedule instances of a role eligibility schedule.
- Parameters
scope (str) – The scope of the role eligibility schedule. Required.
filter (str) – The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo(‘{userId}’) to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user. 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 RoleEligibilityScheduleInstance 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_eligibility_schedule_requestsattribute.Cancels a pending role eligibility schedule request.
- Parameters
- 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
-
create(scope: str, role_eligibility_schedule_request_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.RoleEligibilityScheduleRequest Creates a role eligibility schedule request.
- Parameters
scope (str) – The scope of the role eligibility schedule request to create. The scope can be any REST resource instance. For example, use ‘/providers/Microsoft.Subscription/subscriptions/{subscription-id}/’ for a subscription, ‘/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}’ for a resource group, and ‘/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}’ for a resource. Required.
role_eligibility_schedule_request_name (str) – The name of the role eligibility to create. It can be any valid GUID. Required.
parameters (RoleEligibilityScheduleRequest or IO) – Parameters for the role eligibility schedule request. Is either a RoleEligibilityScheduleRequest type or a IO type. Required.
- Keyword Arguments
- Returns
RoleEligibilityScheduleRequest or the result of cls(response)
- Return type
- Raises
Get the specified role eligibility schedule request.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleEligibilityScheduleRequest or the result of cls(response)
- Return type
- Raises
Gets role eligibility schedule requests for a scope.
- Parameters
scope (str) – The scope of the role eligibility schedule requests. Required.
filter (str) – The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role eligibility schedule requests requested by the current user. Use $filter=asTarget() to return all role eligibility schedule requests created for the current user. Use $filter=asApprover() to return all role eligibility schedule requests where the current user is an approver. 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 RoleEligibilityScheduleRequest 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_eligibility_schedulesattribute.Get the specified role eligibility schedule for a resource scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleEligibilitySchedule or the result of cls(response)
- Return type
- Raises
Gets role eligibility schedules for a resource scope.
- Parameters
scope (str) – The scope of the role eligibility schedules. Required.
filter (str) – The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedules at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedules at, above or below the scope for the specified principal. Use $filter=assignedTo(‘{userId}’) to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user. 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 RoleEligibilitySchedule 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_management_policiesattribute.Delete a role management policy.
- Parameters
- 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
Get the specified role management policy for a resource scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleManagementPolicy or the result of cls(response)
- Return type
- Raises
Gets role management policies for a resource scope.
-
update(scope: str, role_management_policy_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.RoleManagementPolicy Update a role management policy.
- Parameters
scope (str) – The scope of the role management policy to upsert. Required.
role_management_policy_name (str) – The name (guid) of the role management policy to upsert. Required.
parameters (RoleManagementPolicy or IO) – Parameters for the role management policy. Is either a RoleManagementPolicy type or a IO type. Required.
- Keyword Arguments
- Returns
RoleManagementPolicy 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_management_policy_assignmentsattribute.-
create(scope: str, role_management_policy_assignment_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.RoleManagementPolicyAssignment Create a role management policy assignment.
- Parameters
scope (str) – The scope of the role management policy assignment to upsert. Required.
role_management_policy_assignment_name (str) – The name of format {guid_guid} the role management policy assignment to upsert. Required.
parameters (RoleManagementPolicyAssignment or IO) – Parameters for the role management policy assignment. Is either a RoleManagementPolicyAssignment type or a IO type. Required.
- Keyword Arguments
- Returns
RoleManagementPolicyAssignment or the result of cls(response)
- Return type
- Raises
Delete a role management policy assignment.
- Parameters
- 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
Get the specified role management policy assignment for a resource scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
RoleManagementPolicyAssignment or the result of cls(response)
- Return type
- Raises
Gets role management assignment policies for a resource scope.
- Parameters
scope (str) – The scope of the role management policy. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either RoleManagementPolicyAssignment or the result of cls(response)
- Return type
- Raises
-