Skip to main content

advanced_threat_protection_settings

Creates, updates, deletes, gets or lists an advanced_threat_protection_settings resource.

Overview

Nameadvanced_threat_protection_settings
TypeResource
Idazure.mysql_flexible_servers.advanced_threat_protection_settings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}".
namestringThe name of the resource.
creationTimestring (date-time)Specifies the UTC creation time of the policy.
provisioningStatestringProvisioning state of the Threat Protection. Known values are: "Succeeded", "Updating", "Canceled", and "Failed".
statestringSpecifies 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. Known values are: "Enabled" and "Disabled".
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, server_name, advanced_threat_protection_name, subscription_idGet a server's Advanced Threat Protection state.
listselectresource_group_name, server_name, subscription_idGets a list of server's Advanced Threat Protection states.
updateupdateresource_group_name, server_name, advanced_threat_protection_name, subscription_idUpdates a server's Advanced Threat Protection state.
update_putexecresource_group_name, server_name, advanced_threat_protection_name, subscription_idUpdates a server's 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.

NameDatatypeDescription
advanced_threat_protection_namestringThe name of the Advanced Threat Protection state. "Default" Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
server_namestringThe name of the server. Required.
subscription_idstring

SELECT examples

Get a server's Advanced Threat Protection state.

SELECT
id,
name,
creationTime,
provisioningState,
state,
systemData,
type
FROM azure.mysql_flexible_servers.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
;

UPDATE examples

Updates a server's Advanced Threat Protection state.

UPDATE azure.mysql_flexible_servers.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;

Lifecycle Methods

Updates a server's Advanced Threat Protection state.

EXEC azure.mysql_flexible_servers.advanced_threat_protection_settings.update_put 
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@advanced_threat_protection_name='{{ advanced_threat_protection_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;