server_advanced_threat_protection_settings
Creates, updates, deletes, gets or lists a server_advanced_threat_protection_settings resource.
Overview
| Name | server_advanced_threat_protection_settings |
| Type | Resource |
| Id | azure.sql.server_advanced_threat_protection_settings |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_server
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
creationTime | string (date-time) | Specifies the UTC creation time of the policy. |
state | string | Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. Required. Known values are: "New", "Enabled", and "Disabled". (New, Enabled, Disabled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
creationTime | string (date-time) | Specifies the UTC creation time of the policy. |
state | string | Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. Required. Known values are: "New", "Enabled", and "Disabled". (New, Enabled, Disabled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, server_name, advanced_threat_protection_name, subscription_id | Get a server's Advanced Threat Protection state. | |
list_by_server | select | resource_group_name, server_name, subscription_id | Get a list of the server's Advanced Threat Protection states. | |
create_or_update | insert | resource_group_name, server_name, advanced_threat_protection_name, subscription_id | Creates or updates an Advanced Threat Protection state. | |
create_or_update | replace | resource_group_name, server_name, advanced_threat_protection_name, subscription_id | Creates or updates an Advanced Threat Protection state. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
advanced_threat_protection_name | string | The name of the Advanced Threat Protection state. "Default" Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
server_name | string | The name of the server. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_server
Get a server's Advanced Threat Protection state.
SELECT
id,
name,
creationTime,
state,
systemData,
type
FROM azure.sql.server_advanced_threat_protection_settings
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND advanced_threat_protection_name = '{{ advanced_threat_protection_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get a list of the server's Advanced Threat Protection states.
SELECT
id,
name,
creationTime,
state,
systemData,
type
FROM azure.sql.server_advanced_threat_protection_settings
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates an Advanced Threat Protection state.
INSERT INTO azure.sql.server_advanced_threat_protection_settings (
properties,
resource_group_name,
server_name,
advanced_threat_protection_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ server_name }}',
'{{ advanced_threat_protection_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: server_advanced_threat_protection_settings
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the server_advanced_threat_protection_settings resource.
- name: server_name
value: "{{ server_name }}"
description: Required parameter for the server_advanced_threat_protection_settings resource.
- name: advanced_threat_protection_name
value: "{{ advanced_threat_protection_name }}"
description: Required parameter for the server_advanced_threat_protection_settings resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the server_advanced_threat_protection_settings resource.
- name: properties
description: |
Resource properties.
value:
state: "{{ state }}"
creationTime: "{{ creationTime }}"
REPLACE examples
- create_or_update
Creates or updates an Advanced Threat Protection state.
REPLACE azure.sql.server_advanced_threat_protection_settings
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND advanced_threat_protection_name = '{{ advanced_threat_protection_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;