managed_server_security_alert_policies
Creates, updates, deletes, gets or lists a managed_server_security_alert_policies
resource.
Overview
Name | managed_server_security_alert_policies |
Type | Resource |
Id | azure.sql.managed_server_security_alert_policies |
Fields
- vw_managed_server_security_alert_policies
- managed_server_security_alert_policies
Name | Datatype | Description |
---|---|---|
creation_time | text | field from the properties object |
disabled_alerts | text | field from the properties object |
email_account_admins | text | field from the properties object |
email_addresses | text | field from the properties object |
managedInstanceName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
retention_days | text | field from the properties object |
securityAlertPolicyName | text | field from the properties object |
state | text | field from the properties object |
storage_account_access_key | text | field from the properties object |
storage_endpoint | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of a security alert policy. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | managedInstanceName, resourceGroupName, securityAlertPolicyName, subscriptionId | Get a managed server's threat detection policy. |
create_or_update | INSERT | managedInstanceName, resourceGroupName, securityAlertPolicyName, subscriptionId | Creates or updates a threat detection policy. |
SELECT
examples
Get a managed server's threat detection policy.
- vw_managed_server_security_alert_policies
- managed_server_security_alert_policies
SELECT
creation_time,
disabled_alerts,
email_account_admins,
email_addresses,
managedInstanceName,
resourceGroupName,
retention_days,
securityAlertPolicyName,
state,
storage_account_access_key,
storage_endpoint,
subscriptionId,
system_data
FROM azure.sql.vw_managed_server_security_alert_policies
WHERE managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND securityAlertPolicyName = '{{ securityAlertPolicyName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties,
systemData
FROM azure.sql.managed_server_security_alert_policies
WHERE managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND securityAlertPolicyName = '{{ securityAlertPolicyName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new managed_server_security_alert_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.managed_server_security_alert_policies (
managedInstanceName,
resourceGroupName,
securityAlertPolicyName,
subscriptionId,
properties
)
SELECT
'{{ managedInstanceName }}',
'{{ resourceGroupName }}',
'{{ securityAlertPolicyName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: properties
value:
- name: state
value: string
- name: disabledAlerts
value:
- string
- name: emailAddresses
value:
- string
- name: emailAccountAdmins
value: boolean
- name: storageEndpoint
value: string
- name: storageAccountAccessKey
value: string
- name: retentionDays
value: integer
- name: creationTime
value: string