Update-AzSqlDatabaseAdvancedThreatProtectionSetting
Sets a advanced threat protection settings on a database.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Update-AzSqlDatabaseAdvancedThreatProtectionSetting
[-PassThru]
[-NotificationRecipientsEmails <String>]
[-EmailAdmins <Boolean>]
[-ExcludedDetectionType <String[]>]
[-StorageAccountName <String>]
[-RetentionInDays <UInt32>]
[-ServerName] <String>
[-DatabaseName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Update-AzSqlDatabaseAdvancedThreatProtectionSetting cmdlet sets a advanced threat protection settings on an Azure SQL database. To use this cmdlet, specify the ResourceGroupName, ServerName and DatabaseName parameters to identify the database. This cmdlet is also supported by the SQL Server Stretch Database service on Azure.
Examples
Example 1: Set the advanced threat protection settings for a database
PS C:\>Update-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01"
This command sets the advanced threat protection settings for a database named Database01 on the server named Server01.
Parameters
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the database where the settings is set.
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies whether the advanced threat protection settings contacts administrators by using email. Leave empty to use the enhanced Azure Security Center experience for consuming alerts, configure notifications and handle suppressions
| Type: | Nullable<T>[Boolean] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies an array of detection types to exclude from the settings. Leave empty to use the enhanced Azure Security Center experience for consuming alerts, configure notifications and handle suppressions The acceptable values for this parameter are:
- Sql_Injection
- Sql_Injection_Vulnerability
- Access_Anomaly
- None
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies a semicolon-separated list of email addresses to which the settings sends alerts. Leave empty to use the enhanced Azure Security Center experience for consuming alerts, configure notifications and handle suppressions
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the resource group to which the server is assigned.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The number of retention days for the audit logs. Leave empty to use the enhanced Azure Security Center experience for consuming alerts, configure notifications and handle suppressions.
| Type: | Nullable<T>[UInt32] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the name of the server.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the name of the storage account to be used. Wildcards are not permitted. This parameter is not required. When this parameter is not provided, the cmdlet will use the storage account that was defined previously as part of the advanced threat protection settings of the database. Leave empty to use the enhanced Azure Security Center experience for consuming alerts, configure notifications and handle suppressions.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
Nullable<T>[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Nullable<T>[[System.UInt32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Outputs
Microsoft.Azure.Commands.Sql.ThreatDetection.Model.DatabaseThreatDetectionsettingsModel