Class SecurityAlertsPolicyProperties
java.lang.Object
com.azure.resourcemanager.sql.fluent.models.SecurityAlertsPolicyProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SecurityAlertsPolicyProperties>
public final class SecurityAlertsPolicyProperties
extends Object
implements com.azure.json.JsonSerializable<SecurityAlertsPolicyProperties>
Properties of a security alert policy.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SecurityAlertsPolicyProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the creationTime property: Specifies the UTC creation time of the policy.Get the disabledAlerts property: Specifies an array of alerts that are disabled.Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SecurityAlertsPolicyProperties from the JsonReader.Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.state()Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage account.Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDisabledAlerts(List<String> disabledAlerts) Set the disabledAlerts property: Specifies an array of alerts that are disabled.withEmailAccountAdmins(Boolean emailAccountAdmins) Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.withEmailAddresses(List<String> emailAddresses) Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent.withRetentionDays(Integer retentionDays) Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.withStorageAccountAccessKey(String storageAccountAccessKey) Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage account.withStorageEndpoint(String storageEndpoint) Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SecurityAlertsPolicyProperties
public SecurityAlertsPolicyProperties()Creates an instance of SecurityAlertsPolicyProperties class.
-
-
Method Details
-
state
Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.- Returns:
- the state value.
-
withState
Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.- Parameters:
state- the state value to set.- Returns:
- the SecurityAlertsPolicyProperties object itself.
-
disabledAlerts
-
withDisabledAlerts
Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force.- Parameters:
disabledAlerts- the disabledAlerts value to set.- Returns:
- the SecurityAlertsPolicyProperties object itself.
-
emailAddresses
-
withEmailAddresses
Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent.- Parameters:
emailAddresses- the emailAddresses value to set.- Returns:
- the SecurityAlertsPolicyProperties object itself.
-
emailAccountAdmins
Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.- Returns:
- the emailAccountAdmins value.
-
withEmailAccountAdmins
Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.- Parameters:
emailAccountAdmins- the emailAccountAdmins value to set.- Returns:
- the SecurityAlertsPolicyProperties object itself.
-
storageEndpoint
Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.- Returns:
- the storageEndpoint value.
-
withStorageEndpoint
Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.- Parameters:
storageEndpoint- the storageEndpoint value to set.- Returns:
- the SecurityAlertsPolicyProperties object itself.
-
storageAccountAccessKey
Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage account.- Returns:
- the storageAccountAccessKey value.
-
withStorageAccountAccessKey
Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage account.- Parameters:
storageAccountAccessKey- the storageAccountAccessKey value to set.- Returns:
- the SecurityAlertsPolicyProperties object itself.
-
retentionDays
Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.- Returns:
- the retentionDays value.
-
withRetentionDays
Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.- Parameters:
retentionDays- the retentionDays value to set.- Returns:
- the SecurityAlertsPolicyProperties object itself.
-
creationTime
Get the creationTime property: Specifies the UTC creation time of the policy.- Returns:
- the creationTime value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SecurityAlertsPolicyProperties>- Throws:
IOException
-
fromJson
public static SecurityAlertsPolicyProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SecurityAlertsPolicyProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SecurityAlertsPolicyProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the SecurityAlertsPolicyProperties.
-