governance_assignments
Creates, updates, deletes, gets or lists a governance_assignments
resource.
Overview
Name | governance_assignments |
Type | Resource |
Id | azure.security.governance_assignments |
Fields
- vw_governance_assignments
- governance_assignments
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
additional_data | text | field from the properties object |
assessmentName | text | field from the properties object |
assignmentKey | text | field from the properties object |
governance_email_notification | text | field from the properties object |
is_grace_period | text | field from the properties object |
owner | text | field from the properties object |
remediation_due_date | text | field from the properties object |
remediation_eta | text | field from the properties object |
scope | text | field from the properties object |
type | text | Resource type |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
properties | object | Describes properties of an governance assignment |
type | string | Resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | assessmentName, assignmentKey, scope | Get a specific governanceAssignment for the requested scope by AssignmentKey |
list | SELECT | assessmentName, scope | Get governance assignments on all of your resources inside a scope |
create_or_update | INSERT | assessmentName, assignmentKey, scope | Creates or updates a governance assignment on the given subscription. |
delete | DELETE | assessmentName, assignmentKey, scope | Delete a GovernanceAssignment over a given scope |
SELECT
examples
Get governance assignments on all of your resources inside a scope
- vw_governance_assignments
- governance_assignments
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 }}';
SELECT
id,
name,
properties,
type
FROM azure.security.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.security.governance_assignments (
assessmentName,
assignmentKey,
scope,
properties
)
SELECT
'{{ assessmentName }}',
'{{ assignmentKey }}',
'{{ scope }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: owner
value: string
- name: remediationDueDate
value: string
- name: remediationEta
value:
- name: eta
value: string
- name: justification
value: string
- name: isGracePeriod
value: boolean
- name: governanceEmailNotification
value:
- name: disableManagerEmailNotification
value: boolean
- name: disableOwnerEmailNotification
value: boolean
- name: additionalData
value:
- name: ticketNumber
value: integer
- name: ticketLink
value: string
- name: ticketStatus
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
DELETE
example
Deletes the specified governance_assignments
resource.
/*+ delete */
DELETE FROM azure.security.governance_assignments
WHERE assessmentName = '{{ assessmentName }}'
AND assignmentKey = '{{ assignmentKey }}'
AND scope = '{{ scope }}';