managed_database_security_alert_policies
Creates, updates, deletes, gets or lists a managed_database_security_alert_policies
resource.
Overview
Name | managed_database_security_alert_policies |
Type | Resource |
Id | azure.sql.managed_database_security_alert_policies |
Fields
- vw_managed_database_security_alert_policies
- managed_database_security_alert_policies
Name | Datatype | Description |
---|---|---|
creation_time | text | field from the properties object |
databaseName | 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 |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of a security alert policy. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | databaseName, managedInstanceName, resourceGroupName, securityAlertPolicyName, subscriptionId | Gets a managed database's security alert policy. |
list_by_database | SELECT | databaseName, managedInstanceName, resourceGroupName, subscriptionId | Gets a list of managed database's security alert policies. |
create_or_update | INSERT | databaseName, managedInstanceName, resourceGroupName, securityAlertPolicyName, subscriptionId | Creates or updates a database's security alert policy. |
SELECT
examples
Gets a list of managed database's security alert policies.
- vw_managed_database_security_alert_policies
- managed_database_security_alert_policies
SELECT
creation_time,
databaseName,
disabled_alerts,
email_account_admins,
email_addresses,
managedInstanceName,
resourceGroupName,
retention_days,
securityAlertPolicyName,
state,
storage_account_access_key,
storage_endpoint,
subscriptionId
FROM azure.sql.vw_managed_database_security_alert_policies
WHERE databaseName = '{{ databaseName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.sql.managed_database_security_alert_policies
WHERE databaseName = '{{ databaseName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new managed_database_security_alert_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.managed_database_security_alert_policies (
databaseName,
managedInstanceName,
resourceGroupName,
securityAlertPolicyName,
subscriptionId,
properties
)
SELECT
'{{ databaseName }}',
'{{ managedInstanceName }}',
'{{ resourceGroupName }}',
'{{ securityAlertPolicyName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- 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