database_advanced_threat_protection_settings
Creates, updates, deletes, gets or lists a database_advanced_threat_protection_settings
resource.
Overview
Name | database_advanced_threat_protection_settings |
Type | Resource |
Id | azure.sql.database_advanced_threat_protection_settings |
Fields
- vw_database_advanced_threat_protection_settings
- database_advanced_threat_protection_settings
Name | Datatype | Description |
---|---|---|
advancedThreatProtectionName | text | field from the properties object |
creation_time | text | field from the properties object |
databaseName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
state | 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 an Advanced Threat Protection state. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | advancedThreatProtectionName, databaseName, resourceGroupName, serverName, subscriptionId | Gets a database's Advanced Threat Protection state. |
list_by_database | SELECT | databaseName, resourceGroupName, serverName, subscriptionId | Gets a list of database's Advanced Threat Protection states. |
create_or_update | INSERT | advancedThreatProtectionName, databaseName, resourceGroupName, serverName, subscriptionId | Creates or updates a database's Advanced Threat Protection state. |
SELECT
examples
Gets a list of database's Advanced Threat Protection states.
- vw_database_advanced_threat_protection_settings
- database_advanced_threat_protection_settings
SELECT
advancedThreatProtectionName,
creation_time,
databaseName,
resourceGroupName,
serverName,
state,
subscriptionId,
system_data
FROM azure.sql.vw_database_advanced_threat_protection_settings
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties,
systemData
FROM azure.sql.database_advanced_threat_protection_settings
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new database_advanced_threat_protection_settings
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.database_advanced_threat_protection_settings (
advancedThreatProtectionName,
databaseName,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ advancedThreatProtectionName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ 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: creationTime
value: string