Skip to main content

role_assignment_schedule_requests

Creates, updates, deletes, gets or lists a role_assignment_schedule_requests resource.

Overview

Namerole_assignment_schedule_requests
TypeResource
Idazure.authorization.role_assignment_schedule_requests

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
approvalIdstringThe approvalId of the role assignment schedule request.
conditionstringThe conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'.
conditionVersionstringVersion of the condition. Currently accepted value is '2.0'.
createdOnstring (date-time)DateTime when role assignment schedule request was created.
expandedPropertiesobjectAdditional properties of principal, scope and role definition.
justificationstringJustification for the role assignment.
linkedRoleEligibilityScheduleIdstringThe linked role eligibility schedule id - to activate an eligibility.
principalIdstringThe principal ID. Required.
principalTypestringThe principal type of the assigned principal ID. Known values are: "User", "Group", "ServicePrincipal", "ForeignGroup", and "Device". (User, Group, ServicePrincipal, ForeignGroup, Device)
requestTypestringThe type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc. Required. Known values are: "AdminAssign", "AdminRemove", "AdminUpdate", "AdminExtend", "AdminRenew", "SelfActivate", "SelfDeactivate", "SelfExtend", and "SelfRenew". (AdminAssign, AdminRemove, AdminUpdate, AdminExtend, AdminRenew, SelfActivate, SelfDeactivate, SelfExtend, SelfRenew)
requestorIdstringId of the user who created this request.
roleDefinitionIdstringThe role definition ID. Required.
scheduleInfoobjectSchedule info of the role assignment schedule.
scopestringThe role assignment schedule request scope.
statusstringThe status of the role assignment schedule request. Known values are: "Accepted", "PendingEvaluation", "Granted", "Denied", "PendingProvisioning", "Provisioned", "PendingRevocation", "Revoked", "Canceled", "Failed", "PendingApprovalProvisioning", "PendingApproval", "FailedAsResourceIsLocked", "PendingAdminDecision", "AdminApproved", "AdminDenied", "TimedOut", "ProvisioningStarted", "Invalid", "PendingScheduleCreation", "ScheduleCreated", and "PendingExternalProvisioning". (Accepted, PendingEvaluation, Granted, Denied, PendingProvisioning, Provisioned, PendingRevocation, Revoked, Canceled, Failed, PendingApprovalProvisioning, PendingApproval, FailedAsResourceIsLocked, PendingAdminDecision, AdminApproved, AdminDenied, TimedOut, ProvisioningStarted, Invalid, PendingScheduleCreation, ScheduleCreated, PendingExternalProvisioning)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
targetRoleAssignmentScheduleIdstringThe resultant role assignment schedule id or the role assignment schedule id being updated.
targetRoleAssignmentScheduleInstanceIdstringThe role assignment schedule instance id being updated.
ticketInfoobjectTicket Info of the role assignment.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectscope, role_assignment_schedule_request_nameGet the specified role assignment schedule request.
list_for_scopeselectscope$filterGets role assignment schedule requests for a scope.
createinsertscope, role_assignment_schedule_request_nameCreates a role assignment schedule request.
cancelexecscope, role_assignment_schedule_request_nameCancels a pending role assignment schedule request.
validateexecscope, role_assignment_schedule_request_nameValidates a new role assignment schedule request.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
role_assignment_schedule_request_namestringThe name (guid) of the role assignment schedule request to get. Required.
scopestringThe fully qualified Azure Resource manager identifier of the resource. Required.
$filterstringThe 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.

SELECT examples

Get the specified role assignment schedule request.

SELECT
id,
name,
approvalId,
condition,
conditionVersion,
createdOn,
expandedProperties,
justification,
linkedRoleEligibilityScheduleId,
principalId,
principalType,
requestType,
requestorId,
roleDefinitionId,
scheduleInfo,
scope,
status,
systemData,
targetRoleAssignmentScheduleId,
targetRoleAssignmentScheduleInstanceId,
ticketInfo,
type
FROM azure.authorization.role_assignment_schedule_requests
WHERE scope = '{{ scope }}' -- required
AND role_assignment_schedule_request_name = '{{ role_assignment_schedule_request_name }}' -- required
;

INSERT examples

Creates a role assignment schedule request.

INSERT INTO azure.authorization.role_assignment_schedule_requests (
properties,
scope,
role_assignment_schedule_request_name
)
SELECT
'{{ properties }}',
'{{ scope }}',
'{{ role_assignment_schedule_request_name }}'
RETURNING
id,
name,
properties,
systemData,
type
;

Lifecycle Methods

Cancels a pending role assignment schedule request.

EXEC azure.authorization.role_assignment_schedule_requests.cancel 
@scope='{{ scope }}' --required,
@role_assignment_schedule_request_name='{{ role_assignment_schedule_request_name }}' --required
;