Skip to main content

access_review_schedule_definitions

Creates, updates, deletes, gets or lists an access_review_schedule_definitions resource.

Overview​

Nameaccess_review_schedule_definitions
TypeResource
Idazure.authorization.access_review_schedule_definitions

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.
backupReviewersarrayThis is the collection of backup reviewers.
createdByobjectThe user or other identity who created this review.
descriptionForAdminsstringThe description provided by the access review creator and visible to admins.
descriptionForReviewersstringThe description provided by the access review creator to be shown to reviewers.
displayNamestringThe display name for the schedule definition.
instancesarrayThis is the collection of instances returned when one does an expand on it.
reviewersarrayThis is the collection of reviewers.
reviewersTypestringThis field specifies the type of reviewers for a review. Usually for a review, reviewers are explicitly assigned. However, in some cases, the reviewers may not be assigned and instead be chosen dynamically. For example managers review or self review. Known values are: "Assigned", "Self", and "Managers". (Assigned, Self, Managers)
scopeobjectDescriptor for what needs to be reviewed.
settingsobjectAccess Review Settings.
statusstringThis read-only field specifies the status of an accessReview. Known values are: "NotStarted", "InProgress", "Completed", "Applied", "Initializing", "Applying", "Completing", "Scheduled", "AutoReviewing", "AutoReviewed", and "Starting". (NotStarted, InProgress, Completed, Applied, Initializing, Applying, Completing, Scheduled, AutoReviewing, AutoReviewed, Starting)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
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
get_by_idselectschedule_definition_id, subscription_idGet single access review definition.
listselectsubscription_id$filterGet access review schedule definitions.
create_or_update_by_idinsertschedule_definition_id, subscription_idCreate or Update access review schedule definition.
create_or_update_by_idreplaceschedule_definition_id, subscription_idCreate or Update access review schedule definition.
delete_by_iddeleteschedule_definition_id, subscription_idDelete access review schedule definition.
stopexecschedule_definition_id, subscription_idStop access review definition.

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
schedule_definition_idstringThe id of the access review schedule definition. Required.
subscription_idstring
$filterstringThe filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'. When one specified $filter=assignedToMeToReview(), only items that are assigned to the calling user to review are returned. Default value is None.

SELECT examples​

Get single access review definition.

SELECT
id,
name,
backupReviewers,
createdBy,
descriptionForAdmins,
descriptionForReviewers,
displayName,
instances,
reviewers,
reviewersType,
scope,
settings,
status,
systemData,
type
FROM azure.authorization.access_review_schedule_definitions
WHERE schedule_definition_id = '{{ schedule_definition_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples​

Create or Update access review schedule definition.

INSERT INTO azure.authorization.access_review_schedule_definitions (
displayName,
descriptionForAdmins,
descriptionForReviewers,
settings,
reviewers,
backupReviewers,
instances,
schedule_definition_id,
subscription_id
)
SELECT
'{{ displayName }}',
'{{ descriptionForAdmins }}',
'{{ descriptionForReviewers }}',
'{{ settings }}',
'{{ reviewers }}',
'{{ backupReviewers }}',
'{{ instances }}',
'{{ schedule_definition_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples​

Create or Update access review schedule definition.

REPLACE azure.authorization.access_review_schedule_definitions
SET
displayName = '{{ displayName }}',
descriptionForAdmins = '{{ descriptionForAdmins }}',
descriptionForReviewers = '{{ descriptionForReviewers }}',
settings = '{{ settings }}',
reviewers = '{{ reviewers }}',
backupReviewers = '{{ backupReviewers }}',
instances = '{{ instances }}'
WHERE
schedule_definition_id = '{{ schedule_definition_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples​

Delete access review schedule definition.

DELETE FROM azure.authorization.access_review_schedule_definitions
WHERE schedule_definition_id = '{{ schedule_definition_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods​

Stop access review definition.

EXEC azure.authorization.access_review_schedule_definitions.stop
@schedule_definition_id='{{ schedule_definition_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;