Skip to main content

governance_assignments

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

Overview

Namegovernance_assignments
TypeResource
Idazure.security.governance_assignments

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
additional_datatextfield from the properties object
assessmentNametextfield from the properties object
assignmentKeytextfield from the properties object
governance_email_notificationtextfield from the properties object
is_grace_periodtextfield from the properties object
ownertextfield from the properties object
remediation_due_datetextfield from the properties object
remediation_etatextfield from the properties object
scopetextfield from the properties object
typetextResource type

Methods

NameAccessible byRequired ParamsDescription
getSELECTassessmentName, assignmentKey, scopeGet a specific governanceAssignment for the requested scope by AssignmentKey
listSELECTassessmentName, scopeGet governance assignments on all of your resources inside a scope
create_or_updateINSERTassessmentName, assignmentKey, scopeCreates or updates a governance assignment on the given subscription.
deleteDELETEassessmentName, assignmentKey, scopeDelete a GovernanceAssignment over a given scope

SELECT examples

Get governance assignments on all of your resources inside a scope

SELECT
id,
name,
additional_data,
assessmentName,
assignmentKey,
governance_email_notification,
is_grace_period,
owner,
remediation_due_date,
remediation_eta,
scope,
type
FROM azure.security.vw_governance_assignments
WHERE assessmentName = '{{ assessmentName }}'
AND scope = '{{ scope }}';

INSERT example

Use the following StackQL query and manifest file to create a new governance_assignments resource.

/*+ create */
INSERT INTO azure.security.governance_assignments (
assessmentName,
assignmentKey,
scope,
properties
)
SELECT
'{{ assessmentName }}',
'{{ assignmentKey }}',
'{{ scope }}',
'{{ properties }}'
;

DELETE example

Deletes the specified governance_assignments resource.

/*+ delete */
DELETE FROM azure.security.governance_assignments
WHERE assessmentName = '{{ assessmentName }}'
AND assignmentKey = '{{ assignmentKey }}'
AND scope = '{{ scope }}';