Skip to main content

governance_rules

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

Overview

Namegovernance_rules
TypeResource
Idazure.security.governance_rules

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
descriptiontextfield from the properties object
condition_setstextfield from the properties object
display_nametextfield from the properties object
excluded_scopestextfield from the properties object
governance_email_notificationtextfield from the properties object
include_member_scopestextfield from the properties object
is_disabledtextfield from the properties object
is_grace_periodtextfield from the properties object
metadatatextfield from the properties object
owner_sourcetextfield from the properties object
remediation_timeframetextfield from the properties object
ruleIdtextfield from the properties object
rule_prioritytextfield from the properties object
rule_typetextfield from the properties object
scopetextfield from the properties object
source_resource_typetextfield from the properties object
tenant_idtextfield from the properties object
typetextResource type

Methods

NameAccessible byRequired ParamsDescription
getSELECTruleId, scopeGet a specific governance rule for the requested scope by ruleId
listSELECTscopeGet a list of all relevant governance rules over a scope
create_or_updateINSERTruleId, scopeCreates or updates a governance rule over a given scope
deleteDELETEruleId, scopeDelete a Governance rule over a given scope
executeEXECruleId, scopeExecute a governance rule
operation_resultsEXECoperationId, ruleId, scopeGet governance rules long run operation result for the requested scope by ruleId and operationId

SELECT examples

Get a list of all relevant governance rules over a scope

SELECT
id,
name,
description,
condition_sets,
display_name,
excluded_scopes,
governance_email_notification,
include_member_scopes,
is_disabled,
is_grace_period,
metadata,
owner_source,
remediation_timeframe,
ruleId,
rule_priority,
rule_type,
scope,
source_resource_type,
tenant_id,
type
FROM azure.security.vw_governance_rules
WHERE scope = '{{ scope }}';

INSERT example

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

/*+ create */
INSERT INTO azure.security.governance_rules (
ruleId,
scope,
properties
)
SELECT
'{{ ruleId }}',
'{{ scope }}',
'{{ properties }}'
;

DELETE example

Deletes the specified governance_rules resource.

/*+ delete */
DELETE FROM azure.security.governance_rules
WHERE ruleId = '{{ ruleId }}'
AND scope = '{{ scope }}';